summaryrefslogtreecommitdiff
path: root/src/gui/curses/gui-curses-bar-window.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-01-31 21:42:04 +0100
committerSebastien Helleu <flashcode@flashtux.org>2011-01-31 21:42:04 +0100
commit142fc29e2529125ef0c436e83eb7a819f1ee6386 (patch)
tree5f8e0c5992cabc7f79407390c2502d1d9a1ec0b1 /src/gui/curses/gui-curses-bar-window.c
parentb19ae1162274df05a0fa594453a1dbe32155fb01 (diff)
downloadweechat-142fc29e2529125ef0c436e83eb7a819f1ee6386.zip
Add some chars after cursor when scrolling input line: new option weechat.look.input_cursor_scroll (bug #21391)
Diffstat (limited to 'src/gui/curses/gui-curses-bar-window.c')
-rw-r--r--src/gui/curses/gui-curses-bar-window.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gui/curses/gui-curses-bar-window.c b/src/gui/curses/gui-curses-bar-window.c
index cd4408117..bf5f7c015 100644
--- a/src/gui/curses/gui-curses-bar-window.c
+++ b/src/gui/curses/gui-curses-bar-window.c
@@ -697,13 +697,12 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
diff = length_screen_before_cursor - chars_available;
if (diff > 0)
{
- /*
- * FIXME: keep some spaces after end of input
- * for example by adding something to diff, like:
- * diff += (9 - (diff % 10));
- * but then scroll position has to be saved
- * (in bar window ?)
- */
+ if (CONFIG_INTEGER(config_look_input_cursor_scroll) > 0)
+ {
+ diff += (CONFIG_INTEGER(config_look_input_cursor_scroll)
+ - 1
+ - (diff % CONFIG_INTEGER(config_look_input_cursor_scroll)));
+ }
/* compute new start for displaying input */
new_start_input = pos_after_start_input + gui_chat_string_real_pos (pos_after_start_input, diff);