diff options
Diffstat (limited to 'gdb/completer.c')
-rw-r--r-- | gdb/completer.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gdb/completer.c b/gdb/completer.c index 44920dd..67d7f45 100644 --- a/gdb/completer.c +++ b/gdb/completer.c @@ -449,6 +449,21 @@ expression_completer (struct cmd_list_element *ignore, return location_completer (ignore, p, word); } +/* See definition in completer.h. */ + +void +set_gdb_completion_word_break_characters (completer_ftype *fn) +{ + /* So far we are only interested in differentiating filename + completers from everything else. */ + if (fn == filename_completer) + rl_completer_word_break_characters + = gdb_completer_file_name_break_characters; + else + rl_completer_word_break_characters + = gdb_completer_command_word_break_characters; +} + /* Here are some useful test cases for completion. FIXME: These should be put in the test suite. They should be tested with both M-? and TAB. @@ -677,6 +692,9 @@ complete_line_internal (const char *text, p--) ; } + if (reason == handle_brkchars + && c->completer_handle_brkchars != NULL) + (*c->completer_handle_brkchars) (c, p, word); if (reason != handle_brkchars && c->completer != NULL) list = (*c->completer) (c, p, word); } @@ -750,6 +768,9 @@ complete_line_internal (const char *text, p--) ; } + if (reason == handle_brkchars + && c->completer_handle_brkchars != NULL) + (*c->completer_handle_brkchars) (c, p, word); if (reason != handle_brkchars && c->completer != NULL) list = (*c->completer) (c, p, word); } |