Skip to content

Commit

Permalink
cursr movement handled by nvim so no longer need to handle
Browse files Browse the repository at this point in the history
tkinter edge case
  • Loading branch information
timeyyy committed May 24, 2016
1 parent f6a2389 commit c23fb2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
4 changes: 2 additions & 2 deletions pytknvim/tests/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def _parse(lines, line_length, mock_inst, eol_trim):
for i, line in enumerate(lines):
# screen doesn't have a \n
if eol_trim:
assert line[-eol_trim:] == ' \n'
assert line[-eol_trim:] == '\n'
try:
assert len(line)-eol_trim == line_length
except AssertionError:
Expand Down Expand Up @@ -142,7 +142,7 @@ def _parse(lines, line_length, mock_inst, eol_trim):


def _parse_text(lines, line_length, mock_inst):
return _parse(lines, line_length, mock_inst, eol_trim=2)
return _parse(lines, line_length, mock_inst, eol_trim=1)


def _parse_screen(lines, line_length, mock_inst):
Expand Down
11 changes: 2 additions & 9 deletions pytknvim/tk_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,9 @@ def tk_pad_line(self, screen_col=None, add_eol=False,
col = self._get_col(screen_col)
for n in range(0, count):
start = "%d.%d" % (line + n, col)
# + 1 spaces to keep cursor on same line..
# TODO a bug in the cursor movement
spaces = " " * (1 + self.current_cols - col)
if not spaces:
import pdb;pdb.set_trace()
spaces = " " * (self.current_cols - col)
if add_eol:
if not spaces:
spaces = ' \n'
else:
spaces += '\n'
spaces += '\n'
if self.debug_echo:
pass
# print('padding from ', start, ' with %d: '
Expand Down

0 comments on commit c23fb2a

Please sign in to comment.