aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/message.h
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-09-01 18:36:29 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2019-09-01 18:53:55 +0200
commit14615f7f67664cd63410999c2cd13ee50ed14571 (patch)
treeb6bb0012f3d74e17f4d80036d57227b724252fca /src/nvim/message.h
parente04b9e7c78bdcf40cce5b5533ce8d7695691dfd6 (diff)
downloadrneovim-14615f7f67664cd63410999c2cd13ee50ed14571.tar.gz
rneovim-14615f7f67664cd63410999c2cd13ee50ed14571.tar.bz2
rneovim-14615f7f67664cd63410999c2cd13ee50ed14571.zip
screen: add some documentation of internals of msg_grid implementation
Diffstat (limited to 'src/nvim/message.h')
-rw-r--r--src/nvim/message.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/nvim/message.h b/src/nvim/message.h
index 1703384bb5..fdb9bc96ca 100644
--- a/src/nvim/message.h
+++ b/src/nvim/message.h
@@ -91,12 +91,22 @@ extern MessageHistoryEntry *last_msg_hist;
EXTERN bool msg_ext_need_clear INIT(= false);
+// allocated grid for messages. Used when display+=msgsep is set, or
+// ext_multigrid is active. See also the description at msg_scroll_flush()
EXTERN ScreenGrid msg_grid INIT(= SCREEN_GRID_INIT);
+EXTERN int msg_grid_pos INIT(= 0);
+
+// "adjusted" message grid. This grid accepts positions relative to
+// default_grid. Internally it will be translated to a position on msg_grid
+// relative to the start of the message area, or directly mapped to default_grid
+// for legacy (display-=msgsep) message scroll behavior.
+// // TODO(bfredl): refactor "internal" message logic, msg_row etc
+// to use the correct positions already.
EXTERN ScreenGrid msg_grid_adj INIT(= SCREEN_GRID_INIT);
-EXTERN int msg_scroll_at_flush INIT(= 0);
+// value of msg_scrolled at latest msg_scroll_flush.
+EXTERN int msg_scrolled_at_flush INIT(= 0);
-EXTERN int msg_grid_pos INIT(= 0);
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "message.h.generated.h"