summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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-24Update startup message to notify about h/l changeMaxime Coste
2018-02-24Allow l/h to cross line boundariesMaxime Coste
l and h are now respectively "next character" and "previous character"
2018-02-24Highlight cursors differently when they lie on an end of lineMaxime Coste
When on an end of line, certain behaviours can be surprising, for example delete will join the following line (which makes sense, and is consistent, but hard to predict if we do not know the cursor is on and end of line). As Kakoune is moving more and more towards treating end of lines as any other character, making it clear when the cursor lies on them seems like a good way to reduce surprise.
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-24Fix crash in select_sentence when not selection to endMaxime Coste
select_sentence could create a buffer iterator preceeding the buffer begin, leading to a crash trying to read line -1.
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-24Always collapse jumps in exec/eval, remove -collapse-jumps switchMaxime Coste
There does not seem to be any reasonable use cases of not collapsing jumps when the input is not comming from the user. Always collapse them. It could make sense to move jump collapsing out of context_wrap as in general any action not comming directly from the user should collapse them, at the moment a comment or mapping will not collapse jumps, which is unfortunate.
2018-02-24Regex: Improve comments and constify some variablesMaxime Coste
Reword various comments to make some tricky parts of the regex engine easier to understand.
2018-02-24regex: track CompiledRegex::StartDesc in the Regex memory domainMaxime Coste
2018-02-23Display number of combined/saved/restored selections in statusDelapouite
2018-02-23Merge remote-tracking branch 'lenormf/fix-makefile'Maxime Coste
2018-02-22Fix typos in C++ string literalsaver-d
informations, dont, incrementaly, alignement
2018-02-22src makefile: Fix the `--static` flag passed to `pkg-config`Frank LENORMAND
2018-02-22Merge remote-tracking branch 'Delapouite/trim'Maxime Coste
2018-02-22NCursesUI: Rework menu placement to fix missing menu on small windowMaxime Coste
2018-02-21Fix crash when iterating through options on window creationMaxime Coste
Window::on_option_changed calls hooks, which can do anything including adding/removing options in the various option managers Fixes #1863
2018-02-20Rewrite OptionManager::flatten_options to use rangesMaxime Coste
Avoid accumulating the flattened options into a vector, generate a lazy range that will give the proper list.
2018-02-20Re-introduce aliases in command name completionMaxime Coste
Aliases are considered again in command name completion, but only if they are more than 3 charactes long. This should prevent cluttering with aliases while still letting long ones being completed.
2018-02-20ranges: Support temporary parameters passed to concatenatedMaxime Coste
2018-02-20Json: Fix buffer overflow when reading json finishing with { or [Maxime Coste
Fixes #1860
2018-02-19user-modes: Fix incorrect use of keymap modeMaxime Coste
The keymap mode was passed to on_next_key_with_autoinfo, which means the mapping was applied directly by the InputHandler. That led to the first key being interpretted as a mapping, then all following keys being executed normally, as if typed in the parent mode of the user mapping.
2018-02-19Fix bug in command parsing post refactoringMaxime Coste
Fixes #1857
2018-02-18Small code tweaks regarding user modesMaxime Coste
2018-02-18Merge remote-tracking branch 'Delapouite/user-mode'Maxime Coste
2018-02-18Makefile: use PKG_CONFIG to get static compilation flags as wellMaxime Coste
2018-02-18CommandManager: unescape % while parsing the stringMaxime Coste
2018-02-18Do not support general commands in filter modeMaxime Coste
2018-02-18normal mode: Fail if ':' is pressed with no CommandManagerMaxime Coste
2018-02-18ShellManager: init from a static list of env varsMaxime Coste
No need to go through a static list and then copy them one by one in a vector.
2018-02-18BufferManager: Support missing ClientManagerMaxime Coste
2018-02-18Buffer: avoid expensive option flattening in on_registred with NoHooksMaxime Coste
2018-02-17'*' uses escaping of meta characters instead of \Q and \EMaxime Coste
Fixes #1825
2018-02-15CommandManager: refactor parsing of commands to iterate through tokensMaxime Coste
Avoid storing a big vector of tokens, read them one by one, and store only the current command.
2018-02-13Add trim_selections primitiveDelapouite
2018-02-12Add declare-user-mode / enter-user-mode commandsDelapouite
2018-02-11Prevent whitespaces in command namesMaxime Coste
Fixes #1843
2018-02-11Do not specify utf8 InvalidPolicy when we are using the default valueMaxime Coste
It was specified only in two call sites, and everywhere now only uses the pass policy, which is the default.
2018-02-11Refuse modification of ReadOnly buffers and make Debug buffer readonlyMaxime Coste
The debug buffer is a bit special as lots of events might mutate it, permitting it to be modified leads to some buggy behaviour: For example, `pipe` uses a ForwardChangeTracker to track buffer changes, but when applied on a debug buffer with the profile flag on, each shell execution will trigger an additional modification of the buffer while applying the changes, leading to an assertion failing as changes might not be happening in a forward way anymore. Trying to modify a debug buffer will now raise an error immediatly.
2018-02-09Regex: Use a template argument instead of a regular one for "forward"Maxime Coste
forward (which controls if we are compling for forward or backward matching) is always statically known, and compilation will first compile forward, then backward (if needed), so by having separate compiled function we get rid of runtime branches.
2018-02-09Regex: minor code cleanupMaxime Coste
2018-02-09FaceRegistry: pass face names as StringViews instead of const String&Maxime Coste
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-02-09diff: try to improve code readabilityMaxime Coste
2018-02-09CommandManager: Use byte rather than columns for token positionsMaxime Coste
Not only are display columns rarely used to give error positions, but they make the parsing much slower as for each token we need to compute the column in the line.
2018-02-06Fix parsing of percent tokens with unicode separatorsMaxime Coste
2018-02-05Handle errors while reloading buffer gracefullyMaxime Coste
Fixes #1831
2018-02-05Remove the `New` flag from a buffer after reloading itMaxime Coste
If we reload a buffer, it means its underlying file exists, hence the New flag does not make sense anymore. It could be that the file appeared on the filesystem in the meantime.
2018-02-04CommandManager: parse command lines as utf8 instead of asciiMaxime Coste
Fixes #1829
2018-02-03Makefile: Only check for pkg-config when on a system that uses itMaxime Coste
This fixes compilation on OSX where pkg-config is not installed by default.