From 8aad45f9d33cc5c5f36c62413d5a0d193cf08dda Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 17 Jan 2013 02:30:26 +0000 Subject: [PATCH] Ctrl right moves to space including end of line --- src/input_win.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/input_win.c b/src/input_win.c index e563d451..3d9526ae 100644 --- a/src/input_win.c +++ b/src/input_win.c @@ -334,13 +334,16 @@ _handle_edit(int result, const wint_t ch, char *input, int *size) } } - // handle some shit if (next_ch == NULL) { inp_x = display_size; wmove(inp_win, 0, inp_x); } else { glong offset = g_utf8_pointer_to_offset(input, curr_ch); - inp_x = offset + 1; + if (offset == display_size - 1) { + inp_x = offset + 1; + } else { + inp_x = offset; + } wmove(inp_win, 0, inp_x); }