diff options
author | 2007-09-22 00:05:49 +1000 | |
---|---|---|
committer | 2007-09-22 00:05:49 +1000 | |
commit | d2d397d9eb8ec9c4003d1ce45b26a7cc133e801f (patch) | |
tree | 61b8a13756c5f4978a79b5cb364f6b49d0edffea /parse_util.h | |
parent | 607e97065958640f09dbe5de103bae0fd7c350c5 (diff) |
Make up/down cursor move up or down when in multiline mode, except if already in search mode or at the top/bottom line. Since part of this is done in script-space, this involves adding some functionality to the commandline builtin.
darcs-hash:20070921140549-75c98-ba9e83f5e6fdecae5df8f83dd863794c6af9770c.gz
Diffstat (limited to 'parse_util.h')
-rw-r--r-- | parse_util.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/parse_util.h b/parse_util.h index e0f4cf26..a1b0b74e 100644 --- a/parse_util.h +++ b/parse_util.h @@ -94,6 +94,23 @@ void parse_util_token_extent( const wchar_t *buff, int parse_util_lineno( const wchar_t *str, int len ); /** + Calculate the line number of the specified cursor position + */ +int parse_util_get_line_from_offset( wchar_t *buff, int pos ); + +/** + Get the offset of the first character on the specified line + */ +int parse_util_get_offset_from_line( wchar_t *buff, int line ); + + +/** + Return the total offset of the buffer for the cursor position nearest to the specified poition + */ +int parse_util_get_offset( wchar_t *buff, int line, int line_offset ); + + +/** Autoload the specified file, if it exists in the specified path. Do not load it multiple times unless it's timestamp changes or parse_util_unload is called. |