summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2023-11-13Merge remote-tracking branch 'krobelus/fix-noincsearch'Maxime Coste
2023-11-13Rename stdin/stdout/stderr in Shell a they conflicts with macrosMaxime Coste
Fixes #5023
2023-11-13Change window_range to emit each element as a separate stringMaxime Coste
2023-11-11Fix spurious incremental search when incsearch=falseJohannes Altmanninger
Regressed in a2c41593a (Fix partial regex text being pushed in history, 2023-11-02).
2023-11-11Fix SingleWord handling in RankedMatchMaxime Coste
subsequence_match_smart_case does not necessarily find the word, but we then check for a contiguous match in which case, if the query is a word, we also have a single word match.
2023-11-11small code cleanupMaxime Coste
2023-11-10Support building ArrayView from contigous iteratorsMaxime Coste
2023-11-05Refactor spawn_shell to return the relevant FDsMaxime Coste
This removes the need for the setup_child callback which is quite tricky as it cannot touch any memory due to vfork, and removes the Pipe abstraction in favor of a more general UniqueFd one.
2023-11-05Remove ignored packed attribute and static_assert on Node sizeMaxime Coste
This static_assert is not necessary for the code to work and is not valid on every platform.
2023-11-05Replace snprintf with format_toMaxime Coste
2023-11-04Do not poll command sockets while shell command is runningJohannes Altmanninger
Accepter is a wrapper around a socket watcher. It always uses EventMode::Urgent, so it will be included in pselect(2) (via EventManager::handle_next_events()) even while we are waiting for a (blocking) shell command. However we will not execute the command received on this socket until after the shell command is done. This is implemented with an early return: void handle_available_input(EventMode mode) { while (not m_reader.ready() and fd_readable(sock)) m_reader.read_available(sock); if (mode != EventMode::Normal or not m_reader.ready()) return; so we read available data but don't close the socket. When using this reproducer { sleep 1 && echo 'nop' | kak -p session } & kak -n -s session -e '%sh{sleep 7}' the first "m_reader.read_available(sock);" will read "nop". Then "m_reader.ready()" is true but the socket is still readable. This means that pselect(2) will return it every time, without blocking. This means that the shell manager runs a hot loop between pselect(2) and waitpid(2). Fix this problem demoting command socket watchers from EventMode::Urgent. This means that we won't pselect(2) it when handling only urgent events. Control-C still works, I'm not sure why. Alternative fix: we could read the commands but then disable the socket. I tried this but it seems too complex. Closes #5014
2023-11-03Merge remote-tracking branch 'krobelus/fix-quoted-vals-expand'Maxime Coste
2023-11-03Add support for 0-padding in format and replace uses of sprintfMaxime Coste
2023-11-03Fix "%val{selections_desc}" being joined by nul instead of spaceJohannes Altmanninger
This should fix a bug in lint.kak though I didn't check.
2023-11-03Use explicit target types for gather calls to bypass clang regressionMaxime Coste
Since clang-16 there has been a regression in the P0522R0 support. (Bug report at https://github.com/llvm/llvm-project/issue/63281) Closes #4892
2023-11-03Replace std::lexicographical_compare_three_way with custom codeMaxime Coste
On latest MacOS this function is still not implemented
2023-11-02Display a message on the tty directly on fatal errorMaxime Coste
Remove the xmessage/MessageBox based implementation.
2023-11-02Fix partial regex text being pushed in historyMaxime Coste
2023-11-01Always ensure we do not scroll past the last lineMaxime Coste
An assert fails from time to time after reloading fifo buffers due to being scrolled past the last line of the buffer. A repro case was not found but this should fix the underlying issue.
2023-10-25Default comparison operators that can beMaxime Coste
2023-10-25Remove redundant comparison operatorsMaxime Coste
Since C++20 (a != b) get automatically rewritten as !(a == b) if the != operator does not exist.
2023-10-25Clear buffer values on fifo buffer recreationMaxime Coste
The cached WordDB/Highlighters/FifoReader are not relevant and are better fully rebuilt than updated. This speeds up rebuilding the WordDB of big fifo buffers such as a `git log`.
2023-10-25Speed up WordSplitterMaxime Coste
Only do utf8 decoding once per codepoint instead of twice, limit the byte length instead of the codepoint length.
2023-10-25Remove unnecessary operator (since C++20)Maxime Coste
2023-10-04Refactor regex_prompt logic and fix function being called on abortMaxime Coste
Fixes #4993
2023-09-28Add an InlineInformation face distinct from InformationLoric Brevet
2023-09-26Add a daemonize-session command and refactor local client handlingMaxime Coste
Make it possible to move the current session to a daemon one after the fact, which is useful to ensure the session state survives client disconnecting, for example when working from ssh.
2023-09-23Merge remote-tracking branch 'krobelus/foot-custom-keypad-sequences'Maxime Coste
2023-09-22Fix quoting of arguments to kak -c SESSIONChris Webb
Filename arguments to kak -c SESSION are passed to the remote sessions as commands like edit 'FILENAME'; but single-quotes in FILENAME are incorrectly escaped as \' instead of being doubled-up. Fix this so kak -c SESSION "foo'bar" becomes edit 'foo''bar'; instead of edit 'foo\'bar'; Reported by @FlyingWombat in https://github.com/mawww/kakoune/issues/4980
2023-09-19Trigger auto completion refresh when necessary on completion selectMaxime Coste
This removes the timing dependent behaviour where `Tab` would only display the completion menu if pressed before the prompt idle timeout This means `exec :dc<tab>` now expands 'dc' to 'define-command' instead of just showing the completion menu a few millis early.
2023-09-08Revert "Do not make cursor visible on force redraw"Maxime Coste
This unfortunately breaks the testing framework, more work necessary before we can do that. This reverts commit 9b1f4f5f204072ceec6481c2b57a7c4c66d8feab.
2023-09-08Merge remote-tracking branch 'divarvel/show-trailing-whitespace'Maxime Coste
2023-09-08Use last display setup instead of recomputing for window_rangeMaxime Coste
Fixes #4964
2023-09-08Do not make cursor visible on force redrawMaxime Coste
2023-09-02Do not make cursor visible after mouse scrolling and view commandsMaxime Coste
ensure cursor is visible after user input except if the command implementation opted-out. Hooks and timers should not enforce visible cursor. PageUp/PageDown and `<c-f>` / `<c-b>` commands still move the cursor as this seemed a desired behaviour.
2023-08-31Still inkorrect inglishMaxime Coste
Hopefully thats better now
2023-08-29Fix incorrect inglishMaxime Coste
2023-08-27Cleanup SIGHUP handling and forking server to backgroundMaxime Coste
Ensure we ignore SIGHUP once the TerminalUI is gone as it will be sent again on fork, fix the parent process terminating due to trying to write to stdout after it was closed. Fixes #4960
2023-08-27Merge remote-tracking branch 'arachsys/create-default-region'Maxime Coste
2023-08-27Remove Window::force_redraw()Maxime Coste
This was mostly redundant with Client::force_redraw.
2023-08-27Small code cleanup in winow.cc/hhMaxime Coste
2023-08-23Revert "Only make cursor visible after buffer or selection change"Maxime Coste
This is currently broken on various corner cases and breaks the "master branch should be good for day to day work" implicit rule, ongoing work to stabilize this feature will take place on the no-cursor-move-on-scroll branch until its deemed ready. This reverts commit 1e38045d702ec6eb2425016d9b02636270ab1b1e. Closes #4963
2023-08-16Only make cursor visible after buffer or selection changeMaxime Coste
Kakoune now does not touch cursors when scrolling. It checks if either the buffer or selections has been modified since last redraw. Fixes #4124 Fixes #2844
2023-08-15Fix segfault when adding an invalid default-region highlighterChris Webb
RegionsHighlighter::create_region() validates the highlighter type argument but RegionsHighlighter::create_default_region() assumes it is correct, segfaulting from dereferencing a null pointer if the given type isn't in the highlighter registry HashMap. @PJungkamp reported this in https://github.com/mawww/kakoune/issues/4959 with a simple recipe to reproduce: :add-highlighter shared/test regions :add-highlighter shared/test/ default-region invalid highlighter :add-highlighter window/test ref test Validate the type argument in RegionsHighlighter::create_default_region() in the same way as RegionsHighlighter::create_region().
2023-08-14Change `+` command not to duplicate identical selections more than onceMaxime Coste
The current exponential behaviour does not seem that useful, it seems more predictible that pressing `+` twice would end up with 3 copies of the original selections instead of 4. Fixes #4533
2023-08-13Minor formatting tweaksMaxime Coste
2023-08-13Add a ProfileScope helper class to replace most profiling usesMaxime Coste
2023-08-05Kakoune 2023.08.05Maxime Coste
2023-08-05Removed unused capturesMaxime Coste
2023-08-05Try to fix clang build issuesMaxime Coste