summaryrefslogtreecommitdiff
path: root/vis.c
AgeCommit message (Collapse)Author
2022-11-29fix miscellaneous spelling mistakesNick Hanley
2022-07-27vis: Some duplicate files were overlooked due to a condition in the wrong placeTom Schwindl
2022-07-23vis: Compare non-existing files by name and existing files by inodeTom Schwindl
2022-07-12vis: Compare inodes instead of filenamesTom Schwindl
2021-02-15vis: correctly close pipe connected to stdin of external processMarc André Tanner
Once we have written all data we should properly close the (correct) pipe. Before we wrongly closed the pipe connected to the standard output stream. More generally, we currently do not listen for child process termination, but instead wait until all the connected pipes are closed. This might be problematic in case the external process keeps hold of the standard I/O file descriptors. One particular example of this is wl-copy(1). See #929
2020-12-10fix typos in commentsMoesasji
2020-11-14vis: fix <C-c> processing after SIGINTMarc André Tanner
There are two main ways how the input queue is managed in vis: - vis_keys_feed(..) appends new input to the queue and immediately starts processing it. Starting from the position before the call i.e. ignoring any previously queued input. This is typically used in key binding handlers where the input queue still contains the mapping leading to the invocation of the handler. In that case new input should be interpreted immediately, before the handler eventually returns and its mapping is consumed. - vis_keys_push(..) with pos=0, appends new input to the end of the queue and starts processing it from the start of the queue, taking the full content into consideration. This is used by the main loop when new input becomes available. This patch switches the handling of <C-c> after a SIGINT from the former to the latter mechanism and fixes mappings using <C-c> in a non-leading position.
2020-09-20Merge branch 'emg-add-ignorecase' of https://github.com/deepcube/vis into masterMarc André Tanner
2020-09-19Add ignorecase optionEvan Gates
Add a global ignorecase boolean option. When set add REG_ICASE to cflags when calling text_regex_compile().
2020-09-17Pass up terminal CSI as events to Lua.Ez Diy
2020-07-17support for primary clipboardJeremy Bobbin
2020-05-12vis: cleanup pre-processing of :-commandsMarc André Tanner
Not sure why we need to allocate space for an additional character. This also avoids creating out of bound pointers.
2020-03-18Merge branch 'single-cursor-is-primary' of https://github.com/3dc1d3/visMarc André Tanner
2020-03-17color-column: Don't change fg/bg if not set explicitlyGennadiy Volkov
eg. if your long line is a comment with green fg, and you set your column color bg red while not specifying the fg, then the result is green fg on red bg. Prior to this change the result would be default fg on red bg, thus one char in the long line of green text would look odd/wrong. Of course if you do explicitly set the column color fg to default in your theme then the result will not be what you expect - ideally we need an UNSPECIFIED color type instead of relying on DEFAULT.
2020-03-17Set single cursor style as primary, not secondaryGennadiy Volkov
2020-02-07vis: restore mode when dot-repeatingGeorgi Kirilov
2020-02-07Merge branch 'fix-cc-cell' of https://github.com/zsugabubus/visMarc André Tanner
2020-02-04vis: make core code more robustMarc André Tanner
The core vis code was originally written under the assumption that there always exists at least one window. However, when being called from the Lua configuration file during start up this is not yet the case. In general, Lua code should always be placed within appropriate event handlers e.g. vis.events.INIT for global configuration. Invoking API functions depending on an active window from top level statements is not supported. Where before the editor simply crashed, these changes turn such code sections into NOPs. Fix #561
2020-01-27vis: make r<Enter> insert a new lineMarc André Tanner
Special case <C-v><Enter> to still insert a carriage return as discussed in #656 and changed in 2cfc9c867bdfd4cc3ae3246f31cf636633fe1a5f. Due to limitations of the current implementation <C-v> is not generic, i.e. combining it as r<C-v><Enter> will not work. Fixes #765
2020-01-27vis: pass absolute path to pre/post save eventsMarc André Tanner
2020-01-26vis: don't search off screen when highlighting matchesGeorgi Kirilov
2020-01-12vis: don't draw colorcolumn after the endzsugabubus
Check for end-of-text.
2018-05-30vis: add loadmethod optionMarc André Tanner
Valid values are `read`, `mmap` or `auto`.
2018-05-16vis: remove v and V in operator pending modeMarc André Tanner
2018-01-26vis: insert carriage return upon <C-v><C-j> in insert modeMarc André Tanner
Fix #656
2017-12-09vis: make selections visible when lua support has been disabledMarc André Tanner
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é Tanner
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é Tanner
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é Tanner
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é Tanner
This should make it easier to see which window is focused.
2017-07-17vis: specify window in mark related APIMarc André Tanner
This should also fix coverity issue 157024.
2017-07-14vis: use distinct mark to save last selectionsMarc André Tanner
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é Tanner
2017-07-11Revert "vis: process aliased key sequences individually"Marc André Tanner
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é Tanner
2017-07-10vis: implement jump list in terms of marksMarc André Tanner
2017-07-08vis: cleanup marks implementationMarc André Tanner
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é Tanner
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é Tanner
This window local register holds the last active selections.
2017-07-04vis: process aliased key sequences individuallyMarc André Tanner
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é Tanner
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é Tanner
Conflicts: view.c view.h
2017-06-27Merge branch 'theme-tweaks-2' of https://github.com/p-e-w/visMarc André Tanner
Conflicts: view.c
2017-06-15vis: normalize selections after motionsMarc André Tanner
Merge overlapping selections. Fix #582
2017-06-15view: do not automatically anchor selections when setting rangeMarc André Tanner
2017-06-15vis: rename uses of Cursor to SelectionMarc André Tanner
2017-06-15view: rename view_cursorsMarc André Tanner
2017-06-15view: rename view_cursors_numberMarc André Tanner
2017-06-15view: rename view_cursors_countMarc André Tanner
2017-06-15view: rename view_cursors_nextMarc André Tanner