summaryrefslogtreecommitdiff
path: root/src/completions.c
AgeCommit message (Collapse)Author
2017-04-04@$#?! strcasestrJérémie Courrèges-Anglas
2017-04-03Fix previous.Jérémie Courrèges-Anglas
2017-04-03Avoid useless deprecation warningsJérémie Courrèges-Anglas
Looks like strcasestr was actually a GNU extension, so using _BSD_SOURCE doesn't make sense. POSIX declares it in strings.h, glibc-2.25 and older declare it in string.h if _GNU_SOURCE is defined.
2016-11-22strcasestr was born in BSD land, contrary to what glibc saysJérémie Courrèges-Anglas
strcasestr might be a portability problems, it is non-standard and some C libraries out there might not provide it.
2016-11-11Debug statement that snuck in previous.Jérémie Courrèges-Anglas
2016-11-11Introduce multiple completion styles.Mathieu OTHACEHE
The default, legacy style is named BASIC. A new completion style named SUBSTRING is added. Use SUBSTRING for window name completion in select command. Use BASIC everywhere else.
2014-01-03Get rid of useless casts of xmalloc/realloc return value.Jérémie Courrèges-Anglas
2014-01-03if (ptr) free(ptr) is not a good idiom.Jérémie Courrèges-Anglas
2006-03-16remove tabs and trailing whitespace.sabetts
2006-03-08* src/main.c (clean_up): properly free rp_frame_numsetsabetts
* src/editor.c (editor_enter): free line->buffer before setting it to the history expansion. * src/completions.c (completions_free): free the rp_completions struct too * src/actions.c (del_frame_undo): free the rp_frame_undo struct too.
2004-12-04update copyright.sabetts
2004-12-02Updated copyright notices.sabetts
2003-05-28* src/completions.c (completions_complete): if direction issabetts
COMPLETION_PREVIOUS, then set last_match to it's previous entry.
2003-05-28* src/globals.h (COMPLETION_NEXT): new definesabetts
(COMPLETION_PREVIOUS): likewise * src/editor.c (editor_complete): remove prototype (editor_complete_prev): new prototype (editor_complete_next): likewise (editor_insert): make it a static function. update prototype (edit_bindings): add editor_complete_prev. replace editor_complete with editor_complete_next. (editor_complete): call completions_complete (editor_complete_next): new function (editor_complete_prev): likewise * src/completions.h (completions_next_completion): remove prototype (completions_update): likewise (completions_assign): likewise (completions_complete): new prototype * src/completions.c (completions_assign): make it a static function (completions_update): likewise (completions_prev_match): new function (completions_next_match): likewise (completions_complete): renamed from completions_next_completion. call completions_next_match and completions_prev_match.
2003-05-27* src/completions.c (completions_next_completion): checksabetts
c->last_match as a match to partial on a virgin completion. * src/group.c (free_groups): new function * src/group.h (free_groups): new prototype * src/main.c (clean_up): call free_groups * src/actions.c (cmd_fdump): free the string returned by frame_dump. * src/completions.c (completions_update): free new_list.
2003-05-27* src/editor.c (saved_command): new local globalsabetts
(edit_binding): new typedef (edit_binding): new struct (edit_bindings): new local global (input_line_new): new function (input_line_free): likewise (execute_edit_action): likewise (editor_forward_char): likewise (editor_backward_char): likewise (editor_forward_word): likewise (editor_backward_word): likewise (editor_beginning_of_line): likewise (editor_end_of_line): likewise (editor_delete_char): likewise (editor_backward_delete_char): likewise (editor_kill_word): likewise (editor_backward_kill_word): likewise (editor_kill_line): likewise (editor_backward_kill_line): likewise (editor_history_previous): likewise (editor_history_next): likewise (editor_abort): likewise (editor_no_action): likewise (editor_insert): likewise (editor_enter): likewise (paste_cut_buffer): likewise (paste_primary_selection): likewise (editor_paste_selection): likewise (editor_complete): likewise (editor_forward_char): new prototype (editor_backward_char): likewise (editor_forward_word): likewise (editor_backward_word): likewise (editor_beginning_of_line): likewise (editor_end_of_line): likewise (editor_delete_char): likewise (editor_backward_delete_char): likewise (editor_kill_word): likewise (editor_backward_kill_word): likewise (editor_kill_line): likewise (editor_paste_selection): likewise (editor_abort): likewise (editor_no_action): likewise (editor_enter): likewise (editor_history_previous): likewise (editor_history_next): likewise (editor_complete): likewise (editor_backward_kill_line): likewise * src/sbuf.h (sbuf): add node field. * src/main.c (xrealloc): don't print debugger output (init_defaults): init history_size (main): initialize rp_selection (main): load history (clean_up): save history * src/linkedlist.h (list_first): new macro * src/input.h (free_history): remove prototype (ring_bell): new function * src/input.c: include unistd.h (input_history): remove (input_num_history_entries): likewise (update_input_window): remove prompt, input, and input_len arguments. add line argument. (update_input_window): use line argument. (ring_bell): new function (get_input): take completion_fn argument. prototype and callers updated. (free_history): remove function (get_more_input): take completion_fn argument. prototype and callers updated. use line structure and its functionality. * src/globals.h (MAX_FONT_WIDTH): new define (rp_selection): new extern * src/globals.c (rp_selection): new global * src/completions.h (completions_new): new prototype (completions_free): likewise (completions_assign): likewise (completions_update): likewise (completions_next_completion): likewise * src/completions.c (completions_new): new function (completions_free): likewise (completions_assign): likewise (completions_update): likewise (completions_next_completion): likewise * src/Makefile.am (ratpoison_SOURCES): add editor.c editor.h history.h and history.c * src/data.h (rp_completions): new typedef (rp_input_line): likewise (completion_fn): likewise (rp_defaults): new field, history_size (rp_completions): new struct (rp_input_line): new struct * src/conf.h (MAX_HISTORY_SIZE): new define (HISTORY_FILE): likewise (VISUAL_BELL): likewise (MODIFIER_PREFIX): set to RP_CONTROL_MASK (INPUT_ABORT_MODIFIER): likewise (INPUT_PREV_HISTORY_MODIFIER): likewise (INPUT_NEXT_HISTORY_MODIFIER): likewise (RESIZE_VGROW_MODIFIER): likewise (RESIZE_VSHRINK_MODIFIER): likewise (RESIZE_HGROW_MODIFIER): likewise (RESIZE_HSHRINK_MODIFIER): likewise * src/actions.c (trivial_completions): new function (window_completions): likewise (colon_completions): likewise (exec_completions): likewise (cmd_select): pass window_completions to get_input (cmd_rename): pass trivial_completions to get_input (cmd_colon): pass colon_completions to get_input and get_more_input (cmd_exec): pass exec_completions to get_input (cmd_newwm): pass trivial_completions to get_input (cmd_resize): convert the keysym modifier to something ratpoison understands.