Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix a bug when inserting text at the end of the buffer

  • Loading branch information...
commit 6d4a2698b907b2f30d06112381cb8e43bfea0d88 1 parent b3a7412
@fmarcia authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 zencoding/zen_editor.py
View
4 zencoding/zen_editor.py
@@ -112,7 +112,9 @@ def get_current_line_range(self):
"""
iter_current = self.get_insert_iter()
offset_start = self.buffer.get_iter_at_line(iter_current.get_line()).get_offset()
- offset_end = offset_start + iter_current.get_chars_in_line() - 1
+ offset_end = offset_start + iter_current.get_chars_in_line()
+ if offset_end != self.get_end_offset():
+ offset_end -= 1
return offset_start, offset_end
def get_caret_pos(self):
Please sign in to comment.
Something went wrong with that request. Please try again.