aboutsummaryrefslogtreecommitdiff
path: root/config.def.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-04-05 10:10:47 +0200
committerMarc André Tanner <mat@brain-dump.org>2015-04-05 19:58:45 +0200
commit164527b74aa6cd04bd50c36399bc14ab90073bcf (patch)
tree53d61af1dc32bb5bfaaa94d06c02bfd521df2de8 /config.def.h
parent1304c0680b8db9d8526eb36f0b563d534703338b (diff)
downloadvis-164527b74aa6cd04bd50c36399bc14ab90073bcf.tar.gz
vis-164527b74aa6cd04bd50c36399bc14ab90073bcf.tar.xz
Introduce new struct VisText
This adds yet another layer of indirection and stores vi related stuff which is associated with a given text but shared among all windows displaying it (e.g. marks). This will also help if one wants to keep texts arround which aren't currently displayed.
Diffstat (limited to 'config.def.h')
-rw-r--r--config.def.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/config.def.h b/config.def.h
index b8657a4..48feb08 100644
--- a/config.def.h
+++ b/config.def.h
@@ -457,7 +457,7 @@ static KeyBinding vis_mode_visual_line[] = {
static void vis_mode_visual_line_enter(Mode *old) {
Win *win = vis->win->win;
- window_cursor_to(win, text_line_begin(vis->win->text, window_cursor_get(win)));
+ window_cursor_to(win, text_line_begin(vis->win->text->data, window_cursor_get(win)));
if (!old->visual) {
window_selection_start(vis->win->win);
vis_modes[VIS_MODE_OPERATOR].parent = &vis_modes[VIS_MODE_TEXTOBJ];
@@ -559,11 +559,11 @@ static KeyBinding vis_mode_insert[] = {
static void vis_mode_insert_leave(Mode *old) {
/* make sure we can recover the current state after an editing operation */
- text_snapshot(vis->win->text);
+ text_snapshot(vis->win->text->data);
}
static void vis_mode_insert_idle(void) {
- text_snapshot(vis->win->text);
+ text_snapshot(vis->win->text->data);
}
static void vis_mode_insert_input(const char *str, size_t len) {
@@ -585,7 +585,7 @@ static KeyBinding vis_mode_replace[] = {
static void vis_mode_replace_leave(Mode *old) {
/* make sure we can recover the current state after an editing operation */
- text_snapshot(vis->win->text);
+ text_snapshot(vis->win->text->data);
}
static void vis_mode_replace_input(const char *str, size_t len) {