Skip to content

Commit

Permalink
minor bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Araq committed Oct 23, 2016
1 parent 283e212 commit ac49496
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buffer.nim
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ proc removeSelectedText*(b: Buffer; selectedA, selectedB: int) =
b.actions.add(Action(k: delFinished, pos: b.cursor, word: "",
version: b.version))
edit(b)
while b.cursor > selectedA:
while b.cursor > selectedA and b.cursor > 0:
if b.cursor <= 0: break
if b.cursor-1 <= b.readOnly: break
prepareForEdit(b)
Expand Down

0 comments on commit ac49496

Please sign in to comment.