aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/message_defs.h
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2025-03-01 16:18:43 +0100
committerLuuk van Baal <luukvbaal@gmail.com>2025-03-03 11:30:15 +0100
commit124c655f56bcf31dfeaf91caee2e5f2fcbbfa089 (patch)
treec6622845253b60c35528d81cc632bba57e809504 /src/nvim/message_defs.h
parentf7fa6d12668ab696fb1d64e04cfac6734cf86a4d (diff)
downloadrneovim-124c655f56bcf31dfeaf91caee2e5f2fcbbfa089.tar.gz
rneovim-124c655f56bcf31dfeaf91caee2e5f2fcbbfa089.tar.bz2
rneovim-124c655f56bcf31dfeaf91caee2e5f2fcbbfa089.zip
feat(messages): "g<" mapping for ext_messages
Problem: Cannot use "g<" mapping with ext_messages. Mapping displays the scrollback buffer since the last command, but the scrollback buffer is not populated with ext_messages. Solution: With ext_messages; store messages in the history that otherwise wouldn't be. Mark them as temporary messages to be deleted when the scrollback buffer would be cleared. To this end, make the message history a doubly-linked list such that messages can be removed from an arbitrary position. Outlook: Default ext_messages UI might not show the hit-enter prompt so we want "g<" to work as a recommended way to show messages for the last command (prompted by an indicator).
Diffstat (limited to 'src/nvim/message_defs.h')
-rw-r--r--src/nvim/message_defs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/message_defs.h b/src/nvim/message_defs.h
index addb80fc25..a65f0cd97a 100644
--- a/src/nvim/message_defs.h
+++ b/src/nvim/message_defs.h
@@ -17,4 +17,5 @@ typedef struct msg_hist {
struct msg_hist *prev; ///< Previous message.
HlMessage msg; ///< Highlighted message.
const char *kind; ///< Message kind (for msg_ext)
+ bool temp; ///< Temporary message since last command ("g<")
} MessageHistoryEntry;