about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-01-17 19:41:44 +0000
committerJames Booth <boothj5@gmail.com>2013-01-17 19:41:44 +0000
commit7b20c16ae057a7b18f5ee6b68796a79931c4a024 (patch)
treed677fb97744ab91e3f8c42ebf77c8d79c9a59777
parentb9ac008b8097cb58efd5a1fdc016c6ebb9e9241a (diff)
parentae4c48d56db19bf17970a44c62677443008097c7 (diff)
downloadprofani-tty-7b20c16ae057a7b18f5ee6b68796a79931c4a024.tar.gz
Merge branch 'master' of github.com:boothj5/profanity
-rw-r--r--src/input_win.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/input_win.c b/src/input_win.c
index 3d9526ae..47d1d23e 100644
--- a/src/input_win.c
+++ b/src/input_win.c
@@ -131,7 +131,7 @@ inp_get_char(char *input, int *size)
             prof_handle_activity();
         }
     }
-
+    
     // if it wasn't an arrow key etc
     if (!_handle_edit(result, ch, input, size)) {
         if (_printable(ch) && result != KEY_CODE_YES) {
@@ -263,7 +263,7 @@ _handle_edit(int result, const wint_t ch, char *input, int *size)
     inp_x = getcurx(inp_win);
 
     // CTRL-LEFT
-    if ((result == KEY_CODE_YES) && (ch == 540) && (inp_x > 0)) {
+    if ((result == KEY_CODE_YES) && (ch == 540 || ch == 539) && (inp_x > 0)) {
         input[*size] = '\0';
         gchar *curr_ch = g_utf8_offset_to_pointer(input, inp_x);
         curr_ch = g_utf8_find_prev_char(input, curr_ch);
@@ -313,7 +313,7 @@ _handle_edit(int result, const wint_t ch, char *input, int *size)
         return 1;
 
     // CTRL-RIGHT
-    } else if ((result == KEY_CODE_YES) && (ch == 555) && (inp_x < display_size)) {
+    } else if ((result == KEY_CODE_YES) && (ch == 555 | ch == 554) && (inp_x < display_size)) {
         input[*size] = '\0';
         gchar *curr_ch = g_utf8_offset_to_pointer(input, inp_x);
         gchar *next_ch = g_utf8_find_next_char(curr_ch, NULL);