"dd" command clears the current line instead of removing it
Bug #790795 reported by
Jarosław Foksa
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ViGedit |
Fix Committed
|
Low
|
Stephen Moore |
Bug Description
"dd" command clears the current line instead of removing it if following conditions are met:
- cursor is placed at the beginning of the line
- the line begins with whitespace (either space or tab)
This bug seems to be related to currently intalled version of Python. I can reproduce it on system with Python 2.7.1 installed. I'm unable to reproduce it on system with exactly the same version of Gedit (2.30.3) and ViGedit but with older version of Python installed (2.6).
To post a comment you must log in.
I managed to solve this issue by slightly modyfing delete_WholeLines() function from text.py:
Before ------- ------- ------- ------- ------- ------- ------- WholeLines( act): lines.select_ Lines(act, number) Selection( act) getIter( act)
delete_ PrevChar( act, withBackSpace=True)
act.pos. move_Forward( act)
delete_ Char(act, withBackSpace=True
-------
def delete_
number = act.vibase.numLines
act.
cut_
cursor = act.pos.
line = cursor.get_line()
if line > 0:
else:
After ------- ------- ------- ------- ------- ------- ------- WholeLines( act): lines.select_ Lines(act, number) Selection( act) getIter( act)
act.lines. select_ ToLineEnd( act)
cut_Selection( act)
delete_ PrevChar( act, withBackSpace=True)
act.pos. move_Forward( act)
delete_ Char(act, withBackSpace=True
-------
def delete_
number = act.vibase.numLines
act.
cut_
cursor = act.pos.
line = cursor.get_line()
if line > 0:
else: