aboutsummaryrefslogtreecommitdiff
path: root/editor.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-10-21 15:27:51 +0200
committerMarc André Tanner <mat@brain-dump.org>2015-10-22 19:48:40 +0200
commit3f6f3bd84b3278fa653d203c0665c53ebfb0cd14 (patch)
tree8473f28ca38829251877f394c5b429c6c3005ef6 /editor.h
parent99601627e5e0b202c55a7807a72958305ceb96eb (diff)
downloadvis-3f6f3bd84b3278fa653d203c0665c53ebfb0cd14.tar.gz
vis-3f6f3bd84b3278fa653d203c0665c53ebfb0cd14.tar.xz
vis: pass editor instance to mode handling functions
Diffstat (limited to 'editor.h')
-rw-r--r--editor.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/editor.h b/editor.h
index 26f07e8..655ef07 100644
--- a/editor.h
+++ b/editor.h
@@ -53,10 +53,10 @@ struct Mode {
const char *status; /* name displayed in the window status bar */
const char *help; /* short description used by :help */
bool isuser; /* whether this is a user or internal mode */
- void (*enter)(Mode *old); /* called right before the mode becomes active */
- void (*leave)(Mode *new); /* called right before the mode becomes inactive */
- void (*input)(const char*, size_t); /* called whenever a key is not found in this mode and all its parent modes */
- void (*idle)(void); /* called whenever a certain idle time i.e. without any user input elapsed */
+ void (*enter)(Vis*, Mode *old); /* called right before the mode becomes active */
+ void (*leave)(Vis*, Mode *new); /* called right before the mode becomes inactive */
+ void (*input)(Vis*, const char*, size_t); /* called whenever a key is not found in this mode and all its parent modes */
+ void (*idle)(Vis*); /* called whenever a certain idle time i.e. without any user input elapsed */
time_t idle_timeout; /* idle time in seconds after which the registered function will be called */
bool visual; /* whether text selection is possible in this mode */
};