fix(cmdline): encode no prompt in cmdline_show.hl_id

Problem:  Unable to distinguish an empty prompt from no prompt in
          cmdline_show event.
Solution: Set cmdline_show.hl_id to -1 when no prompt is active.
This commit is contained in:
Luuk van Baal
2026-05-22 21:16:16 +02:00
committed by luukvbaal
parent 60a46036c0
commit d16bd456a8
4 changed files with 29 additions and 24 deletions

View File

@@ -1390,7 +1390,7 @@ function Screen:_handle_cmdline_show(content, pos, firstc, prompt, indent, level
if firstc == '' then
firstc = nil
end
if prompt == '' then
if hl_id == -1 then
prompt = nil
end
if indent == 0 then