aboutsummaryrefslogtreecommitdiff
path: root/vis.c
AgeCommit message (Collapse)AuthorFilesLines
2018-01-26vis: insert carriage return upon <C-v><C-j> in insert modeMarc André Tanner1-1/+1
Fix #656
2017-12-09vis: make selections visible when lua support has been disabledMarc André Tanner1-2/+6
When the fore and background colors are the same, swapping them has no effect. Instead use the specified cell attributes. Previously the CELL_ATTR_REVERSE used in the default selection style was ignored. In general the default style definitions for non-Lua builds could probably be improved further. Fix #635
2017-11-04vis: take symbolic keys into account when evaluating key prefixesMarc André Tanner1-6/+32
Previously `ci<` would have no immediate effect because in operator pending mode `i<` was wrongly treated as a powwible prefix of `i<Tab>`. Fix #624
2017-09-15vis: remove ! operatorMarc André Tanner1-11/+1
Use visual mode and :| to filter text through external commands. The mapping was already reused for selection complement.
2017-07-23vis: use strncpy to copy into fixed sized bufferMarc André Tanner1-1/+1
In practice this was never an issue also it is guaranteed that the terminating zero byte is already there. Fixes coverity issue 157023.
2017-07-23vis: only draw selections of currently active windowMarc André Tanner1-2/+3
This should make it easier to see which window is focused.
2017-07-17vis: specify window in mark related APIMarc André Tanner1-1/+1
This should also fix coverity issue 157024.
2017-07-14vis: use distinct mark to save last selectionsMarc André Tanner1-1/+13
This partially reverts f9e2b884c15919757651db8b10c033a344a19e75 further jumps after leaving visual mode should not break `gv`.
2017-07-14vis-lua: make selection first class primitives in Lua APIMarc André Tanner1-1/+1
2017-07-11Revert "vis: process aliased key sequences individually"Marc André Tanner1-12/+2
This reverts commit 54ca598fcccff8844bfbe494cd3b325b2fea487f. The key handling functions are called too often. This for example causes problems for `r` (replace char) in combination with :langmap.
2017-07-10vis: let '^ mark point to top of jump listMarc André Tanner1-11/+1
2017-07-10vis: implement jump list in terms of marksMarc André Tanner1-20/+7
2017-07-08vis: cleanup marks implementationMarc André Tanner1-16/+1
We now use ' to refer to marks. Mark a is set using 'am and restored using 'aM while this is slightly harder to type than ma and 'a it is consistent with register usage for yank/put and allows a default mark to be used which is handy for quick selection manipulation primitives.
2017-07-07vis: use marks instead of registers to store selectionsMarc André Tanner1-11/+9
The key binding remain the same, but the selections are now stored on a per-buffer basis.
2017-07-04vis: implement `gv` by means of new "^ registerMarc André Tanner1-12/+10
This window local register holds the last active selections.
2017-07-04vis: process aliased key sequences individuallyMarc André Tanner1-2/+12
While the complete alias is added to the input queue, the called key bindings should only see the keys they have asked for. Previously a mapping such as: :map! normal gv \"^Sv did not work as expected because the key binding for the register did reject an invalid multi letter register name. Might also influence #581
2017-06-27vis: properly set initial window ui optionsMarc André Tanner1-1/+2
This should keep the EOF markers visible when another option is enabled. The whole UI option handling is a bit of a mess. In the longterm more of the drawing code should be moved into Lua.
2017-06-27Merge branch 'show-eof' of https://github.com/p-e-w/visMarc André Tanner1-1/+1
Conflicts: view.c view.h
2017-06-27Merge branch 'theme-tweaks-2' of https://github.com/p-e-w/visMarc André Tanner1-1/+1
Conflicts: view.c
2017-06-15vis: normalize selections after motionsMarc André Tanner1-0/+4
Merge overlapping selections. Fix #582
2017-06-15view: do not automatically anchor selections when setting rangeMarc André Tanner1-1/+3
2017-06-15vis: rename uses of Cursor to SelectionMarc André Tanner1-45/+45
2017-06-15view: rename view_cursorsMarc André Tanner1-7/+7
2017-06-15view: rename view_cursors_numberMarc André Tanner1-1/+1
2017-06-15view: rename view_cursors_countMarc André Tanner1-3/+3
2017-06-15view: rename view_cursors_nextMarc André Tanner1-7/+7
2017-06-15view: rename view_cursors_prevMarc André Tanner1-1/+1
2017-06-15view: rename view_cursors_selection_saveMarc André Tanner1-2/+2
2017-06-15view: rename view_cursors_selection_getMarc André Tanner1-6/+6
2017-06-15view: rename view_cursors_primary_{get,set}Marc André Tanner1-2/+2
2017-06-15view: rename view_cursors_disposeMarc André Tanner1-2/+2
2017-06-15view: remove view_cursors_multipleMarc André Tanner1-3/+3
2017-06-15vis: promote selections to first class primitivesMarc André Tanner1-25/+8
This unifies cursors and selections. The cursor are now represendted as singleton selections.
2017-06-15vis: strip double leading slashes of pathsMarc André Tanner1-1/+3
This fixes the internal representation as well as the path displayed in the status bar. Previously opening a file in the root directory e.g. /foo would be display as //foo.
2017-06-10More theme improvementsPhilipp Emanuel Weidmann1-1/+1
2017-06-04Add option to hide EOF markerPhilipp Emanuel Weidmann1-2/+2
2017-05-31vis: fix compiler warning concerning write(2) return valueMarc André Tanner1-1/+1
2017-05-19vis: improve `:<` command implementationMarc André Tanner1-3/+13
When we have nothing to write to an external process, redirect stdin to /dev/null instead of using a pipe which is immediately closed. Some commands change their behavior when used in a shell pipeline. As an example the following did not work as expected: :< ag pattern Fix #556
2017-05-17vis: ensure complete ! command output is displayedMarc André Tanner1-3/+11
For interactive processes started using `:!` stdout is redirected to stderr normally used by vis to draw its user interface. For some reason the first byte written by the interactive application is not being displayed. I suspect it has something to do with the terminal state change. For now we are writing a dummy space (which is never shown) ourself to ensure that the complete output is visible. Fix #545
2017-05-12vis: immediately update screen after a vis_redraw callMarc André Tanner1-0/+1
By default we only update the screen once per main loop iteration. This might change in the future, but for now we force an update when a redraw is explicitly requested.
2017-05-06vis: add vis_interrupt{,requested} functionsMarc André Tanner1-0/+8
2017-05-06vis: add doxygen commentsMarc André Tanner1-2/+7
Rename some structures, add typedefs for function pointers, remove unused arguments from vis_run.
2017-05-04vis: improve job control for forked processMarc André Tanner1-2/+27
We need to unblock SIGTERM for the child process. Also we should deliver signals to the correct process group. This is still fragile and will need to be rewritten when we finally introduce a global event loop.
2017-05-03vis: introduce count iterator to handle interrupted flagMarc André Tanner1-0/+22
2017-05-03text: rename text_sigbus to text_mmapedMarc André Tanner1-1/+1
Add casts to uintptr_t to avoid unrelated pointer comparisons.
2017-04-24vis: fix newline insertion at end of fileMarc André Tanner1-1/+1
With enabled auto indentation and tab expansion in an empty buffer, the following would insert one newline too many: i<Tab><Enter>
2017-04-23vis: fix # register countMarc André Tanner1-1/+1
Previously the # register was always reported as containing only one entry. This wrongly caused the first value to be put at all locations. Fix #544
2017-04-20vis: add # register to insert cursor numberMarc André Tanner1-0/+1
2017-04-20vis: start cleaning up register related codeMarc André Tanner1-57/+0
Now that register.h is no longer used by view.h we can move the struct and function declarations to vis-core.h.
2017-04-19vis: restructure register handlingMarc André Tanner1-7/+24
Decouple register content from cursors. Previously each cursor had exactly one corresponding register. Now each register can save a list of values whose lifetime is not tied to the cursor. If multiple cursors exist and a put with a register holding only a single value is performed, then this value is inserted at every cursor location. If there are fewer values available than cursors, then only the matching ones will be used. If a register holding multiple values is inserted in a single cursor context, only the first value will be used. Another option would be to join all existing values. The details of this behavior might be changed in the future. <C-r> in insert mode has not yet been adapted and register handling in general needs to be cleaned up further. Fix #527