parent
3a0d9481ac
commit
625e7f8249
|
@ -782,6 +782,7 @@ Some of Kakoune state is available through environment variables:
|
|||
* `kak_reg_<r>`: value of register <r>
|
||||
* `kak_session`: name of the current session
|
||||
* `kak_client`: name of current client
|
||||
* `kak_modified`: buffer has modifications not saved
|
||||
* `kak_source`: path of the file currently getting executed (through the source command)
|
||||
* `kak_cursor_line`: line of the end of the main selection
|
||||
* `kak_cursor_column`: column of the end of the main selection (in byte)
|
||||
|
|
|
@ -87,6 +87,8 @@ informations about Kakoune's state:
|
|||
*kak_source*::
|
||||
path of the file currently getting executed (through the source
|
||||
command)
|
||||
*kak_modified*::
|
||||
buffer has modifications not saved
|
||||
*kak_cursor_line*::
|
||||
line of the end of the main selection
|
||||
*kak_cursor_column*::
|
||||
|
|
|
@ -123,6 +123,10 @@ void register_env_vars()
|
|||
"client", false,
|
||||
[](StringView name, const Context& context) -> String
|
||||
{ return context.name(); }
|
||||
}, {
|
||||
"modified", false,
|
||||
[](StringView name, const Context& context) -> String
|
||||
{ return context.buffer().is_modified() ? "true" : "false"; }
|
||||
}, {
|
||||
"cursor_line", false,
|
||||
[](StringView name, const Context& context) -> String
|
||||
|
|
Loading…
Reference in New Issue
Block a user