| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
These functions were only used for testing the text system. One of
them was moved to text-test.c to continue to facilitate this.
Otherwise these functions are just cluttering up the code and
making it hard to modify.
|
|
These are not seperate things and keeping them this way makes
gives this convoluted mess where both Wins and UiWins must have
linked lists to the other Wins and UiWins in the program despite
the fact that neither of them can exist in isolation.
This, like my previous cleanup commits, is part of a larger goal
of properly isolating the various subsystems in vis. Doing so is
required if we ever want to be able to have a vis-server and a
vis-client.
|
|
Same as previous commit each window only has a single View. No
need for it to be stored elsewhere in memory.
|
|
There only exists a single Ui so there is no need to force a
pointer redirection for accessing it.
The Ui member was moved down in vis-core.h to punt around an issue
with the way lua checks for existing objects. It may show up again
as I flatten more structs.
|
|
|
|
|
|
|
|
the message window gets closed like a normal window and nothing calls
this function. In fact, it wasn't even used when it was added 8 years
ago in 979ab79.
|
|
Add a global ignorecase boolean option. When set add REG_ICASE to cflags
when calling text_regex_compile().
|
|
This keeps the existing testing infrastructure, which pipes newline
separated commands to stdin, working.
|
|
|
|
At the command prompt, commands were not recognized properly when the
cursor was placed on a delimiting character (:, ?, /) while pressing
enter.
Fix #653
|
|
|
|
Conflicts:
view.c
view.h
|
|
|
|
|
|
|
|
|
|
|
|
This unifies cursors and selections. The cursor are now represendted
as singleton selections.
|
|
|
|
At some point it should probably be possible to add command prompt
bindings from within Lua. Currently there is no easy/realiable way
to detect the prompt window.
Should improve #526.
|
|
|
|
<Enter> now searches for lines starting with command delimiters to
find the command boundaries.
To actually enter a literal new line use <Ctrl-v><Enter> in insert
mode or `o` / `O` in normal mode.
Also remove the special <Backspace> mapping, does not seem esential
use <Escape> to close the prompt window.
|
|
This is a not yet successful attempt to reduce terminal flickering
when resizing windows as is for example the case when entering
command mode.
UI related debug output can be enabled with:
$ make CFLAGS=-DDEBUG_UI=1
$ ./vis > log
|
|
|
|
This means no event handlers are run for it, hence there is no chance
for recursive errors.
|
|
The following vi commands have been dropped:
- saveas
- xit
- !
The following commands are only recognized in their short form:
- e (edit)
- q (quit)
- s (substitute)
- w (write)
- r (read)
|
|
For those not familiar with sam(1) more information can be found at
http://sam.cat-v.org/
For now sam commands can be entered from the vis prompt via :sam <cmd>
A command behaves differently depending on the mode in which it is issued:
- in visual mode it behaves as if an implicit extract x command
matching the current selection(s) would be preceding it. That is
the command is executed once for each selection.
- in normal mode:
* if an address for the command was provided it is evaluated starting
from the current cursor position(s) i.e. dot is set to the current
cursor position.
* if no address was supplied to the command then:
+ if multiple cursors exist, the command is executed once for every
cursor with dot set to the current line of the cursor
+ otherwise if there is only 1 cursor then the command is executed
with dot set to the whole file
The command syntax was slightly tweaked to accpet more terse commands.
- When specifiying text or regular expressions the trailing delimiter can
be elided if the meaning is unambigious.
- If only an address is provided the print command will be executed.
- The print command creates a selection matching its range.
- In text entry \t inserts a literal tab character (sam only recognizes \n).
Hence the sam command ,x/pattern/ can be abbreviated to x/pattern
If a command is successful vis switches to normal mode (and hence removes
any selections), otherwise the editor is kept in visual mode. The print
command "fails" by definition.
|
|
|
|
|
|
|
|
The currently visible display port is always adjusted
in a way that the primary cursor is visible.
|
|
This should actually make the search history functionality work.
The :-commands already worked because of commit e745b5ef.
Removing all trailing white spaces would be the wrong thing
to do for the search, because they might be part of the
desired search string.
|
|
Make replace mode a child of insert mode and visual line a
child of visual mode. This means any key binding for the
former is automatically available in the latter. Also keys
can not be unmapped solely from the child modes.
|
|
Display Lua errors in a dedicated window/file. A typo or missing
dependency (e.g. lpeg) in visrc.lua will no longer silently fail
without any indication.
The Lua integration in view.h is not yet converted.
|
|
|
|
Close #70
|
|
|