Mercurial > hg > octave-lyh
diff src/input.cc @ 1430:045e70a15a8f
[project @ 1995-09-19 07:05:37 by jwe]
author | jwe |
---|---|
date | Tue, 19 Sep 1995 07:09:50 +0000 |
parents | 69d15711b832 |
children | b44fe7cf2a6b |
line wrap: on
line diff
--- a/src/input.cc +++ b/src/input.cc @@ -704,6 +704,8 @@ return names; } +// XXX FIXME XXX -- make this generate file names when appropriate. + static char ** generate_possible_completions (const char *text, char *& prefix, char *& hint) @@ -712,13 +714,10 @@ prefix = 0; - if (text && *text && *text != '.') - { - if (strrchr (text, '.')) - names = generate_struct_completions (text, prefix, hint); - else - names = make_name_list (); - } + if (text && *text && *text != '.' && strrchr (text, '.')) + names = generate_struct_completions (text, prefix, hint); + else + names = make_name_list (); return names; } @@ -847,7 +846,8 @@ if (matches == 1 && looks_like_struct (buf)) rl_completion_append_character = '.'; else - rl_completion_append_character = ' '; + rl_completion_append_character + = user_pref.completion_append_char; return buf; } @@ -911,7 +911,6 @@ operate_and_get_next (int count, int c) { int where; - extern int history_stifled, history_length, max_input_history; // Accept the current line. @@ -921,7 +920,8 @@ where = where_history (); - if (history_stifled && (history_length >= max_input_history)) + if ((history_is_stifled () && (history_length >= max_input_history)) + || (where >= history_length - 1)) saved_history_line_to_use = where; else saved_history_line_to_use = where + 1;