| Age | Commit message (Collapse) | Author | Files | Lines |
|
Under presently-not-precise circumstances, regex patterns longer
than a screenful can cause first_match_pos to be nil. In this
sutation, evaluating `first_match_pos - 1' will be an error, so
jump to matchless case.
|
|
Currently the only "internal window" with a status bar is the information
window used to display Lua stack traces. We do not want to trigger events
for it, because that could result in further Lua errors. Nonetheless its
status bar should be properly redrawn to avoid display artifacts. That is
why we fall back to the built-in default status bar as used by non-Lua
builds.
|
|
The intention here is to catch any errors in unprotected mode,
close the lua state and jump back to the mainloop to give the
user the opportunity to take care of unsaved changes.
We abuse the infrastructure Lua provides for custom memory
allocators to associate our vis instance pointer with the lua
state. In the panic handler we can then use lua_getallocf to
get our context back. The actual memory allocater is equivalent
to the one used by default and just forwards everything to the
libc.
|
|
|
|
|
|
While the invoked Lua functions are executed in protected mode,
the validation of the return values currently happens in unprotected
mode. Thus an invaid return value triggers a lua error and because
we currently do not have a global panic handler registered this will
terminate the editor process.
This commit changes the return value validation to silently fall
back to default values instead of raising errors. If we want to provide
user friendly stack traces showing the origin of the offending value
we would have to move the validation into the Lua code.
|
|
|
|
Make sure that curses and libtermkey don't fight over
the terminal state. Also send use SIGTSTP instead of
SIGSTOP.
Previously certain shells (e.g. csh, dash) would get
stuck after the editor process was suspended for the
second time.
Not completely sure whether this is correct, but it
seems to work in my limited tests.
|
|
|
|
This was wrongly changed in commit 74085e92c095d0bf4b98e262cc07ccf9b7dfff3b.
|
|
|
|
Do not create an invalid cursor when no further match exists.
|
|
The exception being when the range is a single line.
|
|
|
|
|
|
When a file was being displayed in multiple windows and changes were
performed to the one showing the preceding file region, the syntax
highlighting of the window showing the later parts would get messed up.
|
|
If the starting position is:
* on a space or tab use the `w` motion
* on the last letter of a word use `l` or `e` depending on whether
a count was given. This also applies for single letter words.
* otherwise use the `e` motion
As in vim `cw` and `dw` behave differently, whether that is desirable
remains to be seen.
Might fix #521
|
|
This should fix the ressource leak as found by CID 142510.
|
|
|
|
|
|
|
|
|
|
|
|
It is no longer possible to change the used syntax by assigning to the
`win.syntax = name` field, instead the function win:set_syntax(name)`
should be called.
The distinction between filetype and syntax lexer to use should probably
be clarified/cleaned up at some point.
|
|
This is only the case during editor startup before the first window is created.
|
|
|
|
|
|
|
|
This also eliminates dead code as reported by CID 142387.
|
|
Added all ANS Forth 2012 keywords as defined at
http://lars.nocrew.org/forth2012/core.html and removed keywords
that were not part of the standard. This necessitated rewriting
most of the Strings rules as well as removing some rules not
consistent with the standard. Only the s\" form should allow
escaping. The list of characters which may appear as part of a
keyword has also been expanded where appropriate.
Because '.' is a keyword as well as the first chatacter in a string
pattern, strings must now be given parsing precedence over keywords
to ensure proper highlighting.
A few errors were also fixed such as moving the true (which should
make keywords case-insensitive) within the word_match function's
closing paren. Parens have been removed from the operator list and
moved to their correct place as the delimiters for block comments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vis.1: added modes description
|
|
This makes sure that a successive view_update call returns
true and as a result the status bar will be correctly redrawn.
|
|
There is no longer a need to explicitly redraw the window status
bar upon a mode change, it will happen anyway during the next UI
update.
|
|
There is no need to treat the currently focused window specially.
|
|
We need to clear the info line before displaying a new message,
otherwise parts of the old cell contents might remain visible.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|