diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-09-25 11:29:53 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-09-25 12:52:27 +0200 |
commit | b710f6a01db827a6a6ea9f74894a6d3dec330734 (patch) | |
tree | 30101e4d7ee535312de7e38d802326f47237419a /src/interface-curses.h | |
parent | d275aee123b9f79524849eba0e63969a6bdfba2f (diff) | |
download | sciteco-b710f6a01db827a6a6ea9f74894a6d3dec330734.tar.gz |
curses UI: properly truncate q-register and file names
* format_str() will now automatically right-truncate strings (with
formatted control characters) exceeding the window width (or provided
maximum width of formatted characters).
This means that Q-Register names in the info line are now properly
truncated.
* introduced format_filename() which takes care of canonicalizing
control characters in a given filename and truncate the filename
if necessary. Filenames are currently left-truncated since the file
name proper and the directory containing it is more significant
than the directory names closer to the root.
On Windows, we make sure that the drive letter is not truncated.
The truncation rules may have to be further tweaked later.
This feature properly truncated file names in the info line and
in the auto-completion popup.
Diffstat (limited to 'src/interface-curses.h')
-rw-r--r-- | src/interface-curses.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/interface-curses.h b/src/interface-curses.h index 9bb17cd..ed228ee 100644 --- a/src/interface-curses.h +++ b/src/interface-curses.h @@ -103,6 +103,10 @@ typedef class InterfaceCurses : public Interface<InterfaceCurses, ViewCurses> { FILE *screen_tty; WINDOW *info_window; + enum { + INFO_TYPE_BUFFER = 0, + INFO_TYPE_QREGISTER + } info_type; gchar *info_current; WINDOW *msg_window; |