Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help message in the completion bar, for auto-discoverable bindings #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/lTerm_read_line.ml
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,11 @@ object(self)

let rec loop idx col = function
| [] ->
()
let help_message = "(M-left, M-right, M-enter)" in
let right_col = size.cols - 2 - Zed_utf8.length help_message in
(* do we have enough space to draw the message right-justified? *)
if right_col >= col then
LTerm_draw.draw_string ctx 0 right_col help_message;
| (word, suffix) :: words ->
let len = Zed_utf8.length word in
LTerm_draw.draw_string ctx 0 col word;
Expand Down