summaryrefslogtreecommitdiff
path: root/src/main.cc
AgeCommit message (Collapse)Author
2023-08-05Kakoune 2023.08.05Maxime Coste
2023-07-29Kakoune 2023.07.29Maxime Coste
2023-07-03Merge remote-tracking branch 'omasanori/fixup-undo-doc'Maxime Coste
2023-06-21Fixup documentation on history navigation commandsMasanori Ogino
Co-authored-by: Johannes Altmanninger <aclopte@gmail.com>
2023-06-20Small structured binding conversionMaxime Coste
2023-06-17Revert "Switch undo storage from a tree to a plain list"Maxime Coste
Moving across history moved to <c-j>/<c-k> to keep <a-u>/<a-U> for selection undo/redo This reverts commit e0d33f51b36c9f0be7ae2467dab455d211bbf561.
2023-06-17Add a few missing entries to the changelogMaxime Coste
2023-06-14Add a -previous switch to show-matching highlighterMaxime Coste
This switch makes show-matching fallback to the character preceeding the cursor if the character under the cursor is not a matching character, which should make show-matching more useful in insert mode.
2023-05-21Add <c-g> to cancel current operationMaxime Coste
The current implementation only does this during regex operations, but should be extensible to other operations that might take a long time by regularly calling EventManager::handle_urgent_events().
2023-05-09Update changelog for selection undoJohannes Altmanninger
2023-05-04Add support for recursive expansions with %exp{...}Maxime Coste
%exp{...} just expands its content the same way double quoted strings do, but using a named expansion type makes it possible to use the more quoting mechanism to avoid quoting hell.
2023-03-11Implement bracketed pasteJohannes Altmanninger
Text pasted into Kakoune's normal mode is interpreted as command sequence, which is probably never what the user wants. Text pasted during insert mode will be inserted fine but may trigger auto-indentation hooks which is likely not what users want. Bracketed paste is pair of escape codes sent by terminals that allow applications to distinguish between pasted text and typed text. Let's use this feature to always insert pasted text verbatim, skipping keymap lookup and the InsertChar hook. In future, we could add a dedicated Paste hook. We need to make a decision on whether to paste before or after the selection. I chose "before" because that's what I'm used to. TerminalUI::set_on_key has EventManager::instance().force_signal(0); I'm not sure if we want the same for TerminalUI::set_on_paste? I assume it doesn't matter because they are always called in tandem. Closes #2465
2023-03-01Merge remote-tracking branch 'inahga/aghani-info-width'Maxime Coste
2023-02-17Complete arguments to "echo -to-file"Johannes Altmanninger
Including this here because grandparent parent commit broke completions for "edit -fifo".
2023-02-15Add option to set maximum info box widthAmeer Ghani
Some plugins (*cough* kak-lsp) and help texts tend to have immensely long content in a single line. This generates info boxes that span the entire terminal width. This is made especially worse on widescreen monitors or at small text size. This grants user control over how wide these boxes are. I deliberately avoid pushing this change to `kak-lsp` because it's not the only plugin that this could help--see the `hook` help text for an example of this problem in vanilla Kakoune. I would also suggest that since this is a rendering concern, it be handled by the terminal rendering logic.
2023-01-21Replace std::strong_ordering with auto return type to not require <compare>Maxime Coste
2022-12-06Load buffer in command line orderMaxime Coste
Pass the first buffer on the the command line explicitely to client creation. This ensure the buffer list matches the command line, which makes buffer-next/buffer-previous a bit more useful. Fixes #2705
2022-11-04Add a %val{selection_count} expansionOlivier Perret
2022-10-31Kakoune 2022.10.31Maxime Coste
2022-07-21Update startup info with p/P breaking changeJohannes Altmanninger
2022-07-10Refactor highlighting logicMaxime Coste
Always start with full buffer lines and trim the display buffer at the very end, treat non-range display atoms as non-trimable in that case and keep track of how many columns are occupied by "widgets" such as line numbers or flags. Fixes #4659
2022-07-05Remove <esc> as end macro recording, Q should be enoughMaxime Coste
Besides being redundant, it is easy to press esc by mistake/habit while recording a macro.
2022-07-05Move user mappings to <space> and keep/remove selection to ,Maxime Coste
2022-07-05Make `x` just select the full linesMaxime Coste
`x` is often criticized as hard to predict due to its slightly complex behaviour of selecting next line if the current one is fully selected. Change `x` to use the previous `<a-x>` behaviour, and change `<a-x>` to trim to fully selected lines as `<a-X>` did. Adapt existing indentation script to the new behaviour
2022-03-06Document ! and <a-!> breaking changeMaxime Coste
2022-03-06Add a complete-command command to configure command completionMaxime Coste
This makes it possible to change command completion in hooks and paves the way to more flexibility in how custom commands can be completed
2022-01-24Do not insert any end-of-line when piping data outMaxime Coste
This will unfortunately break some use case which will require using wrapper scripts to add the necessary newline. It is however harder to do the contrary, and it makes a lot of other use case possible, such as checksuming. Fixes #3669
2021-11-15Fixes #4432: JSON UI only shows stdin when connecting to an existing sessionSidharth Kshatriya
Only ui type Terminal is intended to be a user interactive session. If your ui type is not Terminal, don't worry about making the tty your stdin if fd 0 is not a tty. This allows json-rpc commands sent via stdin to be acted up rather than sent to a fifo (which is the default behavior for kakoune). Does not change the behavior for Terminal ui sessions
2021-11-07Kakoune 2021.11.08Maxime Coste
2021-10-28Kakoune 2021.10.28Maxime Coste
2021-10-25src/main.cc: Fix inline assembly syntax error on ARMRobert Clausecker
ARM uses @ as a comment character, so %progbits must be used in place of @progbits here. This change fixes the build on armv7 FreeBSD 13.0. Fixes mawww/kakoune/issues#4385 See also https://bugs.freebsd.org/259434
2021-09-26Restore diff based terminal output optimization when synchronizedMaxime Coste
terminal_synchronized ui_option now also controls this behaviour, update out of date documentation for ui_options as well. As discussed in #4317
2021-09-02Remove terminal_wheel_up/down_button UI optionMaxime Coste
It seems nobody uses it, and it is not plugged through anyway. Closes #2642
2021-08-28Kakoune 2021.08.28Maxime Coste
2021-08-22Fix readonly behaviourMaxime Coste
Make readonly specified on startup only apply to files provided on the command line, and use the correct scope in `edit -readonly` Fixes #4278
2021-07-26Do not run unit tests in release buildsMaxime Coste
They mostly rely on assertions that are disabled in those builds anyway.
2021-07-20Document the new write behaviourMaxime Coste
2021-07-12Rename NCursesUI to TerminalUIMaxime Coste
2021-07-12Replace ncurses with a naive custom terminal backendMaxime Coste
2021-07-12Quit server on SIGINT when it was not signaled by Kakoune itselfMaxime Coste
Fixes #3974
2021-07-07Document command-fifo in changelogMaxime Coste
2021-05-28Support opening files bigger than 2 GiBMaxime Coste
The real technical limit is with lines bigger than 2 GiB and buffers with more than 2 Gi lines, refactor buffer loading to make it possible to load those files. Fix an overflow with the hash_data function at the same time
2021-04-27Improve UX: better error message about debug buffer on startup errorsMarkus F.X.J. Oberhumer
Minuscule things like these can make a huge difference if you are a first time user of a new text editor.
2021-03-11Always redraw after getting some user inputMaxime Coste
2020-12-22src: Catch “kill exceptions”’cleanlyFrank LENORMAND
When the `kill` command is called in the `-E` CLI flag, the resulting exception is not caught and crashes the server. This commit allows the server to terminate cleanly. Since `KakEnd` hooks also need to be executed should the user run a command like `kak -E 'kill 0'`, the execution of `KakBegin` hooks is now performed *before* the command provided in `-E` is executed. The documentation for `KakBegin` (executed after the `-E` command prior to this commit) consequently becomes more truthful, as it states: KakBegin session name kakoune has started, this hook is called just after reading the user configuration files Fixes #3972
2020-10-27Replace `write -atomic` with `write -method <method>`Maxime Coste
`-atomic` becomes `-method replace` and `-method overwrite` is now supported explicitely instead of only available through the writemethod option. Fixes #3827
2020-10-20Notify prompt completion changes in startup messageMaxime Coste
2020-10-19Allow quiting last client with unsaved buffer in daemon modeMaxime Coste
Because the server will out-live that client's disconnection it is still ok to have modified buffers, the server will complain on `kill`. Fixes #3801
2020-09-09Add support for removing from optionsMaxime Coste
`set -remove ...` will remove from the current option value, substracting from int, removing elements from vectors and maps.
2020-09-01Kakoune 2020.09.01Maxime Coste