Implemented username tab completion, cleaned up existing tabcomp code, added --disable-tabcomp option
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@313 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
diff --git a/winio.c b/winio.c
index e4a98fb..bdab195 100644
--- a/winio.c
+++ b/winio.c
@@ -247,8 +247,11 @@
int start_x)
{
int kbinput = 0, j = 0, x = 0, xend;
- int x_left = 0, inputlen, tabbed = 0, shift = 0;
+ int x_left = 0, inputlen, tabbed = 0;
char *inputbuf;
+#ifndef DISABLE_TABCOMP
+ int shift = 0;
+#endif
inputbuf = nmalloc(strlen(def) + 1);
inputbuf[0] = 0;
@@ -340,6 +343,7 @@
x--;
nanoget_repaint(buf, inputbuf, x);
break;
+#ifndef DISABLE_TABCOMP
case NANO_CONTROL_I:
if (allowtabs) {
shift = 0;
@@ -349,6 +353,7 @@
nanoget_repaint(buf, inputbuf, x);
}
break;
+#endif
case KEY_LEFT:
if (x > strlen(buf))
x--;