screen: add some documentation of internals of msg_grid implementation

This commit is contained in:
Björn Linse
2019-09-01 18:36:29 +02:00
parent e04b9e7c78
commit 14615f7f67
6 changed files with 54 additions and 16 deletions

View File

@@ -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"