changeset 99:7fffb8a6b229

[/trunk] Changeset 113 by mikael * Fix a bug in completion (when cursor is not at EOL)
author mikael
date Thu, 21 Apr 2005 17:15:13 +0000
parents f20831f7d349
children 8fedef290c4e
files mcabber/src/screen.c
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/src/screen.c	Wed Apr 20 20:35:48 2005 +0000
+++ b/mcabber/src/screen.c	Thu Apr 21 17:15:13 2005 +0000
@@ -31,7 +31,6 @@
 } window_entry_t;
 
 
-/* Variables globales a SCREEN.C */
 static WINDOW *rosterWnd, *chatWnd, *inputWnd;
 static WINDOW *logWnd, *logWnd_border;
 static PANEL *rosterPanel, *chatPanel, *inputPanel;
@@ -48,7 +47,7 @@
 static int  completion_started;
 
 
-/* Funciones */
+/* Functions */
 
 int scr_WindowWidth(WINDOW * win)
 {
@@ -641,7 +640,7 @@
       GSList *list = compl_get_category_list(COMPL_CMD);
       if (list) {
         const char *cchar;
-        char *prefix = g_strndup(&inputLine[1], ptr_inputline-inputLine);
+        char *prefix = g_strndup(&inputLine[1], ptr_inputline-inputLine-1);
         new_completion(prefix, list);
         cchar = complete();
         if (cchar)