summaryrefslogtreecommitdiff
path: root/src/normal.cc
AgeCommit message (Collapse)Author
2018-07-05Store each selection as a separate element in a registerMaxime Coste
It makes more sense to use the list nature of the register to store the selections instead of storing them as a single string separated by spaces.
2018-07-05Fix selection save/restore from registers post selection list syntax changeMaxime Coste
2018-06-30src: Make `C` skip empty linesFrank LENORMAND
This commits changes the way `C` behaves when the next line is empty: instead of stopping the selection, it will now jump to the next line that can hold a selection as big as the current one. The primitive's count parameter holds the maximum amount of selections that should be added to the current one. Closes #2061
2018-06-30src: Fix cycle hogging when using `C` at EOFFrank LENORMAND
2018-06-30src: Make `!` re-evaluate the command for each selectionFrank LENORMAND
Fixes #2138
2018-06-21Refactor the way main selection is determined after rotating contentsMaxime Coste
Fixes #2133
2018-06-03Add MenuStyle::Search that prevents the menu from hiding buffer textMaxime Coste
Fixes #2042
2018-05-26Do not expose C++ typeid().name to user facing errors on wrong option typeMaxime Coste
Fixes #2079
2018-05-21Small code cleanupMaxime Coste
2018-05-19Fix behaviour of extending to next match when wrappingMaxime Coste
If the search wraps to get to next match, drop that selection when extending.
2018-05-14Do not push jumps implicitely in transient contextsMaxime Coste
This should improve performance in draft contexts.
2018-05-02Refactor buffer undo treeMaxime Coste
Store the undo tree as an array of undo nodes, instead of as a pointer based tree.
2018-04-29Rework the way UI can trigger a client quittingMaxime Coste
Add a UserInterface::is_ok method and return false on SIGHUP/stdin closing/socket dropping This should be cleaner and more robust than the previous SIGHUP handling code. Fixes #1594
2018-04-29Rename move to move_cursorMaxime Coste
move is pretty ambiguous and hard to find due to std::move.
2018-04-19Complete word from the current buffer in regex_promptMaxime Coste
This allows to use Kakoune fuzzy matching to get the words we are looking for.
2018-04-11Add support for the shift modifier.Tim Allen
Because keyboard layouts vary, the shift-modifier `<s-…>` is only supported for special keys (like `<up>` and `<home>`) and for ASCII lowercase where we assume the shift-modifier just produces the matching uppercase character. Even that's not universally true, since in Turkish `i` and `I` are not an uppercase/lowercase pair, but Kakoune's default keyboard mappings already assume en-US mappings for mnemonic purposes. Mappings of the form `<s-x>` are normalized to `<X>` when `x` is an ASCII character. `<backtab>` is removed, since we can now say `<s-tab>`.
2018-04-07Make FaceRegistry scopedMaxime Coste
set-face now takes a scope argument, and faces can be overridden on a buffer or window basis. colorscheme apply on global scope, which should be good enough for now. Fixes #1411
2018-04-06Make error messages more consistentDelapouite
2018-03-27Support count in <a-s> to split on groups of n linesMaxime Coste
Fixes #1966
2018-03-26Fix operator priority order errorMaxime Coste
2018-03-25Remove contains_that and use any_of to be closer to the c++ stdlibMaxime Coste
2018-03-25Move rotate selection and rotate selection contents to ) and <a-)>Maxime Coste
Backward rotation are supported with (. Fixes #1210
2018-03-25Use 1 and -1 for Forward/Backward Direction to simplify codeMaxime Coste
2018-03-23Support `%` in `path` option to mean current buffer directoryMaxime Coste
In the end, % is not that painful to work with as its only set seldomly, and we usually dont need to use expansion at the same time. Moreover, it just requires a single \ to be escaped. Fixes #1562
2018-03-13ranges: Add transform overload taking directly a pointer to memberMaxime Coste
This overload will forward to the general transform implementation using std::mem_fn to generate a callable.
2018-03-13Do not jump to buffer start on `g.` with no previous modificationsMaxime Coste
2018-03-10Move WORD text object to <a-w>Maxime Coste
It improves consistency and it looked like there was support for that change on github. Fixes #1861
2018-03-05Regex: take the full subject range as a parameterMaxime Coste
To allow more general look arounds out of the actual search range, pass a second range (the actual subject). This allows us to remove various flags such as PrevAvailable or NotBeginOfSubject, which are now easy to check from the subject range. Fixes #1902
2018-03-03Remove unused lambda capturefsub
2018-03-01Reintroduce complex selection merging behaviourMaxime Coste
Selection merging is necessary if we want X to work nicely when we are on EOL (jumping to next line is as nice as it could be, and we are much more often on EOL nowadays).
2018-02-26Merge remote-tracking branch 'Delapouite/sels'Maxime Coste
2018-02-25Remove avoidance of end of linesMaxime Coste
Various places in Kakoune code used to modify selections so that cursors would not lie on an end of line. Remove those to increase Kakoune's consistency and simplicity. Now that end of lines are highlighted separately, they should not be handled specially in most commands.
2018-02-24goto last change: do not try to avoid end of linesMaxime Coste
Avoiding end of line is a behaviour we avoid (pun intended) more and more in Kakoune source code, now that end of lines are regularly selected, it makes no sense to just to next line when last modification lies on an EOL (and it probably did not make much sense back when that code was written).
2018-02-24Revert "Do not save last command/pipe/regex in register when history is ↵Maxime Coste
disabled" This reverts commit 55621fb4cc9c01972317182dd6a8ed3ced0e1f9e. This should not be necessary as :exec/eval already save those registers and reset them by default, and it breaks the ability to use those registers during an eval/exec (as the commands behave differently)
2018-02-23Display number of combined/saved/restored selections in statusDelapouite
2018-02-22Fix typos in C++ string literalsaver-d
informations, dont, incrementaly, alignement
2018-02-22Merge remote-tracking branch 'Delapouite/trim'Maxime Coste
2018-02-18Merge remote-tracking branch 'Delapouite/user-mode'Maxime Coste
2018-02-18normal mode: Fail if ':' is pressed with no CommandManagerMaxime Coste
2018-02-17'*' uses escaping of meta characters instead of \Q and \EMaxime Coste
Fixes #1825
2018-02-13Add trim_selections primitiveDelapouite
2018-02-12Add declare-user-mode / enter-user-mode commandsDelapouite
2018-02-09Add a limit to the size of selection with which we will try to diff on pipeMaxime Coste
Limit to 100K of data for now, as we diff at the byte level.
2018-01-31Do not strip whitespaces with '*'Maxime Coste
Stripping whitespaces there is a failed experiment as it breaks the ability to use multi-selections consistently: Using '*' followed by some `N` to add following matches, we end up with mismatched selections due to whitespace stripping the original selection still contains whitespaces where all the new ones do not. Once we get to this state, most selection commands will give different results for the initial selection and the other ones, breaking predictible multiselection use, one of the cornerstones of Kakoune editing model.
2018-01-26Use '/' register as the default register for <a-k> and <a-K>Maxime Coste
Fixes #1808
2018-01-24Support multiline selections in C/<a-C>Maxime Coste
Fixes #1725
2018-01-19Do not save last command/pipe/regex in register when history is disabledMaxime Coste
2018-01-12Save/restore main selection from/to stringsMaxime Coste
Always consider that the first selection in the list is the main one, save selections that way. This approach was suggested by PR #1786 but the implementation here is different, and is used more generally whenever we save selections to strings. This is also the prefered way to work only on the main selection: save selections with Z, reduce to main with <space>, restore with z. Closes #1786 Fixes #1750
2017-12-29Correctly set the NotBeginOfSubject/NotEndOfSubject flags for regex matchingMaxime Coste
Fixes #1778
2017-12-17Use existing window reference in view modeDelapouite