summaryrefslogtreecommitdiff
path: root/main.c
AgeCommit message (Collapse)Author
2025-01-12array: delete onelinersRandy Palamar
same as buffer commit Array is completely visible
2025-01-11buffer: delete pointless buffer_init functionRandy Palamar
lets not make the code harder to read for no reason
2024-05-30remove the vis->initialized memberRandy Palamar
I already fixed the reason that this even existed (vis_event_emit getting called at random times when the editor wasn't ready). The option checking in main() was moved up because I noticed it was in the wrong place while thinking about where to emit the INIT event. There is no reason to do a bunch of useless work just to print the version.
2024-05-21remove some ui pointer chasingRandy Palamar
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.
2024-05-21replace UiTerm with Ui & delete function pointersRandy Palamar
2024-05-21make Selection unopaqueRandy Palamar
2024-05-21make View unopaqueRandy Palamar
2024-05-21cleanup some single line get/set functionsRandy Palamar
2024-05-21cleanup vis event interfaceRandy Palamar
This removes the function pointer interface which was adding needless complexity and making it difficult to add new events. Now if new events are only meant for lua they only need to be added to the lua interface. This will also have a minor reduction in runtime memory usage and produce a smaller binary. The only runtime difference is that QUIT happens after all windows have been closed and their files freed.
2024-04-29Emit an event (ui_draw) immediately before drawing the screenRudy Dellomas III
This allows better control over styling, as well as potential for entirely new UI elements implemented entirely using the Lua API.
2024-02-05use correct apostrophe in error messageErlend Lind Madsen
2020-12-28vis: implement multiline to/till motionsMarc André Tanner
These are currently not mapped by default but can be enabled by mappings using their virtual key names.
2020-12-28vis: rename to/till motion internalsMarc André Tanner
This renames the functions and constants implementing the to/till motions. The new names should indicate that matches are only returned within the current line (not globally). Apart from the changed virtual key/command name this contains no functional changes.
2020-12-10vis: make O implementation independent of <Up> mappingMarc André Tanner
2020-10-10vis: add vis-selection-new-match-allEvan Gates
Add new vis-selection-new-match-all command, default keybinding <C-a> in visual mode. Refactor selections_next_match to find all matches if arg.b is true. This does not affect existing configs as arg.b defaults to false.
2020-10-10vis: refactor selections_match_nextEvan Gates
A lot of code from selections_match_next was duplicated in selections_match_next_literal. Use the new text_object_find_next/prev functions to combine the two match_next functions into one.
2020-09-17Pass up terminal CSI as events to Lua.Ez Diy
2020-08-29vis: improve C-n behavior in visual modeMarc André Tanner
Determine the matching behavior based on the first (not primary) selection. Fix #864
2020-08-29vis: implement C-n in normal mode with a mapping to viwMarc André Tanner
2020-08-01vis: remove ae outer entire text objectMarc André Tanner
Use :, which is a short hand for :0,$ instead.
2020-08-01vis: remove ie inner entire text objectMarc André Tanner
2020-08-01vis: remove z> rightmost pairwise selection combinatorMarc André Tanner
2020-08-01vis: remove z< leftmost pairwise selection combinatorMarc André Tanner
2020-08-01vis: remove z- shorter pairwise selection combinatorMarc André Tanner
2020-08-01vis: remove z+ longer pairwise selection combinatorMarc André Tanner
2020-08-01vis: remove z& pairwise selection intersectionMarc André Tanner
2020-08-01vis: remove z| pairwise unionMarc André Tanner
2020-04-28vis: make <Escape> reset count in visual modesMarc André Tanner
2020-04-28vis: make <Escape> reset count in normal modeMarc André Tanner
Fix #825
2020-02-03vis: improve <C-n> in visual modeMarc André Tanner
If the existing primary selection is not a word, switch to a literal search. This should still avoid unwanted prefix matches (e.g. when renaming related variables) but allow searching for arbitrary regions. Fix #746
2020-02-03vis: simplify selections_match_nextMarc André Tanner
Introduce utility function to create new anchored, primary selection.
2020-01-30main: fix a few mistakes in commentsTwoFinger
2020-01-30vis: Fix a few :help stringsTwoFinger
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
2018-05-16vis: remove v and V in operator pending modeMarc André Tanner
2018-05-16vis: remove gPMarc André Tanner
This only removes the user visible mapping, the underlying implementation is kept for now. It is used in insert mode for the implementation of <C-r> (register insertion).
2018-05-16vis: remove gpMarc André Tanner
This only removes the user visible mapping, the underlying implementation is kept for now. This might change in the future.
2018-05-16vis: implement g~ using tr(1)Marc André Tanner
2018-05-16vis: implement gU using tr(1)Marc André Tanner
2018-05-16vis: implement gu using tr(1)Marc André Tanner
2018-04-08Fix "parenthese" in identifiersTwoFinger
2018-03-27main: fix a few typos in commentsDelapouite
2018-03-05Fix a typo in identifiersTwoFinger
2018-02-27vis: implement normal/outer paragraph text objectMarc André Tanner
2018-02-27vis: reset count after window scroll/slide actionsMarc André Tanner
Previously something like n<C-e> would also apply the count `n` to the subsequent action.
2017-12-08vis: let <C-c> behave as <Escape> if only one selection existsMarc André Tanner
This should allow the :-command prompt to be closed with <C-c><C-c> (from insert mode) or <C-c> (from normal mode). Fix #608
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-27vis: ignore SIGQUITMarc André Tanner
Pressing Ctrl+\ should probably not terminate the editor. In previous versions libtermkey would disable signal generation by disabling termios VQUIT. However, curses probably overrides it when they both fight for terminal settings. This should probably be cleaned up at some point. Ignoring SIGQUIT seems like a good idea anyway.
2017-07-17vis: specify window in mark related APIMarc André Tanner
This should also fix coverity issue 157024.
2017-07-17vis: fix coverity issue 157025Marc André Tanner
The static analyzer can currently not infere that there always exists at least one selection.