aboutsummaryrefslogtreecommitdiff
path: root/editor.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-07-23 14:38:45 +0200
committerMarc André Tanner <mat@brain-dump.org>2015-07-26 12:13:44 +0200
commitd7a7a3efde175e944cc6943170c9f60467850060 (patch)
tree3d415c3b8892af2e453414fdcf73aace3285c2c9 /editor.h
parent5e016233a9fe77258edd85a2dc746d20e6db46a0 (diff)
downloadvis-d7a7a3efde175e944cc6943170c9f60467850060.tar.gz
vis-d7a7a3efde175e944cc6943170c9f60467850060.tar.xz
vis: add infrastructure to support multiple cursors/selections
This cleans up the existing selection handling code and adds the necessary bits to eventually support multiple cursors/selections. The cursor position is kept track of using marks, which means retrieving the cursor position is no longer a constant time operation. Furthermore the terminal cursor is no longer used, instead the whole window is redrawn after every cursor movement.
Diffstat (limited to 'editor.h')
-rw-r--r--editor.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/editor.h b/editor.h
index fb57469..7f05b12 100644
--- a/editor.h
+++ b/editor.h
@@ -75,7 +75,7 @@ typedef struct {
typedef struct {
size_t (*cmd)(const Arg*); /* a custom movement based on user input from vis.c */
- size_t (*view)(View*); /* a movement based on current window content from view.h */
+ size_t (*view)(Cursor*); /* a movement based on current window content from view.h */
size_t (*txt)(Text*, size_t pos); /* a movement form text-motions.h */
size_t (*file)(File*, size_t pos);
enum {
@@ -260,7 +260,6 @@ void editor_suspend(Editor*);
* that all windows which show the affected region are redrawn too. */
void editor_insert_key(Editor*, const char *data, size_t len);
void editor_replace_key(Editor*, const char *data, size_t len);
-void editor_backspace_key(Editor*);
void editor_insert(Editor*, size_t pos, const char *data, size_t len);
void editor_delete(Editor*, size_t pos, size_t len);
void editor_replace(Editor*, size_t pos, const char *data, size_t len);