summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-04-19Merge remote-tracking branch 'Icantjuddle/add_hash_unit_test'Maxime Coste
2021-04-18CommentsBen Judd
2021-04-18commentsBen Judd
2021-04-18Merge remote-tracking branch 'Screwtapello/support-keypad-keys'Maxime Coste
2021-04-18Merge remote-tracking branch 'alexherbo2/fix-edit-readonly'Maxime Coste
2021-04-17mallinfo is deprecated in favor of mallinfo2Ben Judd
2021-04-17hash unit tests.Ben Judd
2021-04-14Fix `edit -readonly` command not setting `readonly` optionTaupiqueur
2021-04-11fix line completion with prefixTw
There's a bug in current line completion, fix it. Signed-off-by: Tw <tw19881113@gmail.com>
2021-04-05[feat] add ui_options: padding_char & padding_fillnojhan
In some cases, it may be difficult to easily spot the area out of the buffer (bad color scheme, small font, superimposed windows). This patch adds two ncurses ui_options to bypass this problem: - `ncurses_padding_char`, to configure the padding character, - `ncurses_padding_fill`, to indicate whether to fill the padding line (or to display a single character). The default config is the legacy one (a single "~").
2021-03-31fix show-whitespace: add missing NNBSP characternojhan
- Add the Narrow No-Break SPace (0x202F, NNBSP) to the list of handled spaces in the show-whitespace highlighter. - Do not add an aditional option, just handle it like NBSP, with the same highlight character.
2021-03-31Parse more data at each fifo buffer readMaxime Coste
2021-03-31Profile individual command runtimeMaxime Coste
Different approach than the one suggested by eraserhd Closes $4095
2021-03-31Tweak completion quoting behaviour once againMaxime Coste
Quote by wrapping in quotes if we are replacing the whole token, using backspaces if the completion only adds to it. This ensure that the inserted completion will be correctly parsed once validated. Fixes #4121
2021-03-26src/ncurses_ui: Teach Kakoune about all the numeric keypad keys.Tim Allen
Kakoune now knows about all the keypad keys listed in: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-PC-Style-Function-Keys https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-VT220-Style-Function-Keys The VT220-style encodings are used to for modified numeric keys when NumLock is off. For example, consider the 8/Up key: | Modifiers | Sequence | Notes | |-----------------|-------------|-------------------| | Unmodified | CSI A | Ordinary up arrow | | Shift | SS3 2 x | Shift-8 | | NumLock | 8 | Ordinary 8 | | Shift + NumLock | CSI 1 ; 2 A | Shift-Up | Note that even though the terminal distinguishes between keypad and regular keys, Kakoune maps keypad keys onto regular keys - keypad Enter is still <ret>, it just supports more modifiers than the regular Enter key.
2021-03-26src/ncurses_ui: move the parse_mask() helper outside parse_csi().Tim Allen
It's useful for parsing modifier masks in all kinds of sequences, not just CSI sequences. Also, since the modifier mask always has "1" as "no modifiers", do the subtraction inside parse_mask() instead of when calling it.
2021-03-22Rename separator-cursor to cursor-separatorhss
2021-03-21Don't use optionals for storing active separator stringhss
2021-03-20Only use separator-cursor for the first line number in a wrapped linehss
2021-03-20Compare column_length of line-number separatorshss
2021-03-20Use optionals more wisely in line-numbershss
2021-03-19line-number: Add option to use a different separator on the current linehss
2021-03-12Fix typo in file.ccMaxime Coste
2021-03-11Do not use replace write method when writing to a non-regular fileMaxime Coste
Fixes #4098
2021-03-11Always redraw after getting some user inputMaxime Coste
2021-03-11Do not select on non-urgent fd when handling only urgent eventsMaxime Coste
This avoids 100% CPU usage when we have pending fifo input while running a shell process, as we will not end-up busy looping in pselect but not reading the available data due to being only processing urgent events.
2021-03-11Merge remote-tracking branch 'eraserhd/fifo-performance-fixes'Maxime Coste
2021-03-09Use inplace_merge() for rangesJason Felice
2021-03-08Binary search for first range to changeJason Felice
2021-03-04Refactor pipe reader/writerMaxime Coste
2021-03-03Raise ThreadedVM initial thread capacity to 16Maxime Coste
Threads are 4 bytes, an initial capacity of 4 led to allocating 16 bytes, raising that to 64 bytes seems quite reasonable.
2021-03-03Re-use the Regex VM when completing filenames to reduce allocationsMaxime Coste
By re-using the VM we avoid re-allocating the threads and saves buffers over and over again. We can just re-use the ones from the previous matching.
2021-03-02Re-tweak command name completion behaviourMaxime Coste
It turns out the fix for #4061 was breaking auto-selection with space of command names.
2021-02-25Follow ECMA specification for regex whitespaceJacob Collins
Changes the behaviour of the \s and \h character classes to include all WhiteSpace and LineTerminator characters defined in the ECMA specification. - <https://262.ecma-international.org/11.0/#sec-white-space> - <https://262.ecma-international.org/11.0/#sec-line-terminators> - <https://262.ecma-international.org/11.0/#sec-characterclassescape> Fixes #4034
2021-02-25Tweak requoting behaviourMaxime Coste
Only requote when completion is replacing the whole token Do not requote command names as they should not require it, tag them as quoted. Fixes #4061
2021-02-16Fix splitting display line in front of a replaced rangeMaxime Coste
When a replaced buffer range atom was starting exactly at the location we wanted to split onto the code would split *after* that atom instead of before. Fixes #4052
2021-02-15Add + key to duplicate selections and <a-+> to merge overlapping onesMaxime Coste
This is an experiment and might get reverted if overlapping selections prove too cumbersome. Fixes #4041
2021-02-11Fix CSI u support for escape keyMaxime Coste
2021-02-01Fix resizing strings to -1 lengthMaxime Coste
Fixes #4042
2021-01-26Check XDG_RUNTIME_DIR owner before creating session directoryMaxime Coste
This avoids an issue when using `su` and running Kakoune which creates a session directory owned by root and prevents the user from creating more sessions.
2021-01-22Write to stderr if execve failsMaxime Coste
This should be rare but should not happen silently, this way it will show in the parent process debug buffer.
2021-01-22Fix performance issue in show-matching highlighter on big buffersMaxime Coste
Stop searching for the matching character when getting out of view instead of going until the buffer edge.
2021-01-22Slight code cleanup in generate_envMaxime Coste
2021-01-15Distinguish <c-h> and Backspace on terminals where that is possible.Tim Allen
Different terminals send different codes to indicate backspace, usually one of \x08 or \x7f, so Kakoune blindly treated both as backspace. However, a given terminal is only likely to use one of those, and mnemonic control codes like <c-h> are a precious resource so we should endeavour to keep backspace and <c-h> separate when we can. Luckily, termios tells us what code our terminal is currently using, and Kakoune already reads the information at startup, so we can just use that information. Thanks to @krobelus for figuring out the C++ syntax required. Fixes #3863.
2021-01-04Merge branch 'master' of http://github.com/Woolworths/kakouneMaxime Coste
2021-01-04Merge remote-tracking branch 'cole-h/trim-only-one-newline'Maxime Coste
2021-01-02command_manager: only remove last eol in %sh{} expansionsCole Helbling
This makes it possible to keep significant EOL in shell expansions (e.g. for use with clipboard helpers).
2021-01-03Merge remote-tracking branch 'jimt/master'Maxime Coste
2021-01-03Add missing limits includesMaxime Coste
Fixes #4003
2021-01-01Fix message typoJim Tittsler