Stop line number display jiggling.
- Made space for column position up to 999.
This commit is contained in:
parent
99339680de
commit
541d541dbf
1 changed files with 1 additions and 1 deletions
|
|
@ -531,7 +531,7 @@ class Editor:
|
|||
@functools.lru_cache(maxsize=100)
|
||||
def get_header(self, path, width, cursor_x, cursor_y, is_changed):
|
||||
change_marker = "*" if is_changed else ""
|
||||
cursor_position = "Line %s Column %s" % (cursor_y + 1, cursor_x + 1)
|
||||
cursor_position = f"Line {cursor_y+1} Column {cursor_x+1:<3}"
|
||||
path_part = (path + change_marker).ljust(width - len(cursor_position) - 2)
|
||||
return (termstr.TermStr(" " + path_part, self._HEADER_STYLE).bold() +
|
||||
termstr.TermStr(cursor_position + " ", self._HEADER_STYLE))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue