diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2010-04-28 23:24:32 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2010-04-28 23:24:32 +0200 |
commit | f1dfe0824349712055f343a27d5a30793d139096 (patch) | |
tree | bf91b62c1f564df3e4657dfb2fbc5b71b82cbcab /src/gui/gui-buffer.h | |
parent | 87d29b19871ef7b967a1a818eae338ed29faade9 (diff) | |
download | weechat-f1dfe0824349712055f343a27d5a30793d139096.zip |
Add keys for undo/redo changes on command line (default: ctrl/alt + underscore) (task #9483)
Diffstat (limited to 'src/gui/gui-buffer.h')
-rw-r--r-- | src/gui/gui-buffer.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gui/gui-buffer.h b/src/gui/gui-buffer.h index 0d6ef808e..2dacd8bdf 100644 --- a/src/gui/gui-buffer.h +++ b/src/gui/gui-buffer.h @@ -57,6 +57,14 @@ struct t_gui_buffer_local_var struct t_gui_buffer_local_var *next_var; /* link to next variable */ }; +struct t_gui_input_undo +{ + char *data; /* content of input buffer */ + int pos; /* position of cursor in buffer */ + struct t_gui_input_undo *prev_undo;/* link to previous undo */ + struct t_gui_input_undo *next_undo;/* link to next undo */ +}; + struct t_gui_buffer { struct t_weechat_plugin *plugin; /* plugin which created this buffer */ @@ -133,6 +141,13 @@ struct t_gui_buffer int input_buffer_pos; /* position into buffer */ int input_buffer_1st_display; /* first char displayed on screen */ + /* undo/redo for input */ + struct t_gui_input_undo input_undo_snap; /* snapshot of input buffer */ + struct t_gui_input_undo *input_undo; /* undo for input */ + struct t_gui_input_undo *last_input_undo; /* last undo for input */ + struct t_gui_input_undo *ptr_input_undo; /* pointer to current undo */ + int input_undo_count; /* number of undos */ + /* completion */ struct t_gui_completion *completion; /* completion */ @@ -252,6 +267,12 @@ extern void gui_buffer_move_to_number (struct t_gui_buffer *buffer, int number); extern void gui_buffer_merge (struct t_gui_buffer *buffer, struct t_gui_buffer *target_buffer); extern void gui_buffer_unmerge (struct t_gui_buffer *buffer, int number); +extern void gui_buffer_undo_snap (struct t_gui_buffer *buffer); +extern void gui_buffer_undo_snap_free (struct t_gui_buffer *buffer); +extern void gui_buffer_undo_add (struct t_gui_buffer *buffer); +extern void gui_buffer_undo_free (struct t_gui_buffer *buffer, + struct t_gui_input_undo *undo); +extern void gui_buffer_undo_free_all (struct t_gui_buffer *buffer); extern struct t_gui_buffer_visited *gui_buffer_visited_search_by_number (int number); extern void gui_buffer_visited_remove (struct t_gui_buffer_visited *buffer_visited); extern void gui_buffer_visited_remove_by_buffer (struct t_gui_buffer *buffer); |