| Age | Commit message (Collapse) | Author | Files | Lines |
|
Holding down <Backspace> at the end of the file should not
keep the cursor on the middle line of the window.
|
|
The last new line is added to the cell matrix but failure
is reported to indicate that there is no space left for
further characters.
|
|
This for example now correctly displays tab characters at
the very start of the visible area.
|
|
Lua support can now be disabled at compile time using:
$ make CONFIG_LUA=0
This commit also adds an initial Lua API and provides a few
default hooks.
We now also require Lua >= 5.2 due to the uservalue constructs.
In principle the same functionality could be implemented using
function environments from Lua 5.1.
|
|
The only used event handler was used to update the '< and '>
marks which is now taken care of by the leave handler of the
visual modes.
|
|
|
|
|
|
|
|
They now belong to the cell holding the corresponding regular
(i.e. non-combining) character. This also means that at least
in theory a cell could hold arbitrary amounts of data, in
practice it is limited to 16 bytes.
|
|
Increase the number of bytes to consider for syntax highligthing
before the visisble area. This should improve the handling of long
block comments.
Closes #110
|
|
When a file was being displayed in multiple windows changes in one
could confuse the other.
|
|
If a change occured on the very first shown character, it was not
properly reflected in the view.
|
|
|
|
|
|
|
|
|
|
|
|
For now the vis table has only one member "lexers".
|
|
|
|
The view_draw function renders the text into the cells
array and resyncs the cursor position. The syntax
highlighting is applied in view_update, which also
instructs the ui to update.
|
|
|
|
The lua based lexers are searched in the following order:
$VIS_PATH/lexers
$HOME/.vis/lexers
/usr/share/vis/lexers
followed by the standard lua package.path
|
|
|
|
The new approach first scrolls the window up such that the current
cursor line lies below the current visible area, then the viewport
is adjusted until the line is once again visible (at the bottom of
the window).
Closes #85
|
|
|
|
Do not create empty windows, more importantly do not overwrite
random memory.
Closes #80
|
|
|
|
|
|
|
|
Styles can now be specified as strings which will make them
easier to specify from outside the editor.
The following style attributes can be given in a comma separated
list:
bold
italics
underlined
fore:color
back:color
where color is either a hex value of the form #aabbcc or one
of the predefined colors:
black
red
green
yellow
blue
magenta
cyan
white
|
|
|
|
|
|
Also text objects in visual mode should now work better.
|
|
This commits introduces the following keybindings, in normal mode:
CTRL-N select word the cursor is currently over, switch to visual mode
CTRL-P remove least recently added cursor
ESC if a selection is active, clear it.
Otherwise dispose all but the primary cursor.
In visual mode:
CTRL-N create new cursor and select next word matching current selection
CTRL-X clear (skip) current selection, but select next matching word
CTRL-P remove least recently added cursor
|
|
|
|
|
|
|
|
This should fix "corruptions" caused by wrong offsets when
editing the same file in multiple windows.
|
|
The problem is that a cursor movement might cause a redraw which
in turn causes the sidebar width to change thus the view to be
resized which will override the cursor position.
|
|
|
|
This cleans up the existing selection handling code and adds the
necessary bits to eventually support multiple cursors/selections.
The cursor position is kept track of using marks, which means
retrieving the cursor position is no longer a constant time operation.
Furthermore the terminal cursor is no longer used, instead the whole
window is redrawn after every cursor movement.
|
|
By now ui-curses.[hc] are the only files dealing directly with
curses related functions. Integration of a proper mainloop is
still pending.
|
|
This should not be a problem in practice, since cell->data is large
enough anyway.
|
|
|
|
Also apply syntax rules every time the file name changes.
|
|
Previously a sequence of Unicode REPLACEMENT CHARACTER was displayed.
Use an explicitly initialized mbstate_t object in the call to mbrtowc().
While this should not strictly be necessary, it works around a bug in
certain implementations.
Closes #56.
|
|
Enable/disable by setting to 0/1 respectively:
:set show spaces=0 tabs=0 newlines=1
|
|
While it is slower, it allows to move to characters which are
currently not visible. This will be handy when experimenting
with multiple cursors.
|
|
View should only display the file content, but not modify it.
|
|
|