mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-06-11 09:35:59 -04:00
terminal: hint first slash command on single slash
Triggers a ghost hint with the first matching slash command when the user inputs a single `/` character.
This commit is contained in:
@@ -545,6 +545,8 @@ fn hintsCallback(input_c: [*c]const u8, arg: ?*anyopaque) callconv(.c) [*c]const
|
||||
// Inside an open `'''…'''` body the buffer is script text, not kv args.
|
||||
if (Schema.hasUnclosedTripleQuote(input)) return null;
|
||||
|
||||
if (std.mem.eql(u8, input, "/")) return ghostFirstMatch(&all_slash_names, "", "");
|
||||
|
||||
if (Schema.parseSlashCommand(input)) |parts| {
|
||||
const ends_ws = input[input.len - 1] == ' ';
|
||||
if (Schema.findByName(parts.name)) |schema| {
|
||||
|
||||
Reference in New Issue
Block a user