Commit 75864958 authored by Chris Allegretta's avatar Chris Allegretta
Browse files

Okay, now format the matches the right way

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@270 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 11 additions and 7 deletions
+11 -7
...@@ -672,15 +672,14 @@ int input_tab(char *buf, int place, int lastWasTab) ...@@ -672,15 +672,14 @@ int input_tab(char *buf, int place, int lastWasTab)
match_matches++; match_matches++;
} }
if (match_matches == num_matches && if (match_matches == num_matches &&
(i == num_matches || matches[i][pos] != 0)) { (i == num_matches || matches[i] != 0)) {
/* All the matches have the same character at pos+1, /* All the matches have the same character at pos+1,
so paste it into buf... */ so paste it into buf... */
buf = nrealloc(buf, strlen(buf) + 2);
strncpy(buf + pos, matches[0] + pos, 1); strncpy(buf + pos, matches[0] + pos, 1);
newplace++; newplace++;
pos++; pos++;
} } else {
else {
beep(); beep();
break; break;
} }
...@@ -718,8 +717,13 @@ int input_tab(char *buf, int place, int lastWasTab) ...@@ -718,8 +717,13 @@ int input_tab(char *buf, int place, int lastWasTab)
strcat(foo, " "); strcat(foo, " ");
col += waddnstr(edit, foo, strlen(foo)); /* now, put the match on the screen */
if (col > (COLS * .8) && matches[i + 1] != NULL) { waddnstr(edit, foo, strlen(foo));
col += strlen(foo);
/* And if the next match isn't going to fit on the
line, move to the next one */
if (col > (COLS - longestname) && matches[i + 1] != NULL) {
editline++; editline++;
wmove(edit, editline, 0); wmove(edit, editline, 0);
col = 0; col = 0;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2000-11-05 16:56-0500\n" "POT-Creation-Date: 2000-11-05 17:48-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment