summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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-08-22Merge branch 'roam-hurd-exec-path' of http://github.com/ppentchev/kakoune ↵Maxime Coste
into HEAD
2021-08-21Find the executable path on the GNU Hurd, too.Peter Pentchev
2021-08-21Use the [[gnu::packed]] C++ attribute.Peter Pentchev
Suggested by: Maxime Coste <mawww@kakoune.org>
2021-08-20Do not break non-GCC/g++ compilers.Peter Pentchev
2021-08-20Make sure the ParsedRegex structure has the right size.Peter Pentchev
Some versions of GCC/g++ will not necessarily pad the structure to a 32-bit boundary, so make the alignment and the filler explicit. Detected on: Debian/m68k; https://buildd.debian.org/status/fetch.php?pkg=kakoune&arch=m68k&ver=2020.09.01-1&stamp=1629387444&raw=0
2021-08-17Move control character escaping responsibility to the terminal UIMaxime Coste
Fix atom text at display time, allow tabs/eol/etc... in display atoms and escape them just-in-time Fixes #4293
2021-08-17Merge remote-tracking branch 'alexherbo2/fix-typos'Maxime Coste
2021-08-17Merge remote-tracking branch 'krobelus/no-env-var'Maxime Coste
2021-08-17Merge remote-tracking branch 'krobelus/complete-at-percent-delimiter'Maxime Coste
2021-08-10Avoid "env var" in error message for unknown %val expansionJohannes Altmanninger
This meaning is only used in C++ sources. The docs use "env var"/"environment variable" a few times for actual environment variables.
2021-08-09Restore prompt completion for "%opt{"Johannes Altmanninger
Commit 2289f350 ("Remove command parsing Reader and just track a ParserState") introduced a small regression in parse_percent_token() because we failed to recognize a token like %val{ as percent-expansion. I tried to add a test case but a UI test doesn't seem possible, e.g. kak -ui json -e "exec ':echo %opt{<tab>}<ret>'" prints: 'exec': option not found: ''
2021-08-05Reduce memory usage and allocations in terminal output codeMaxime Coste
Store data in unique_ptr instead of vectors as we have fixed sizes Do not allocate new hashes, recompute them on-demand
2021-08-05Remove unnecessary fflush callMaxime Coste
2021-08-04Fallback to 80x24 terminal size when ioctl fails or returns 0x0Maxime Coste
Fixes #4286
2021-08-01Use a BufferedWriter to output in the terminal ui instead of stdioMaxime Coste
Clearer control of buffering and flushing
2021-07-31Add a format_with format function that takes a FunctionRef appendMaxime Coste
2021-07-31Expose BufferedWriterMaxime Coste
2021-07-31Fix FunctionRef copy constructionMaxime Coste
The template constructor was mistaken as a copy constructor.
2021-07-31Code style tweak for Regex implementation TestVMMaxime Coste
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-26always inline custom operator new/delete to avoid spurious warningsMaxime Coste
GCC 11 warns incorrectly about mismatched new/delete because it auto inlines one but not the other, force inline those function to fix that.
2021-07-20Document the new write behaviourMaxime Coste
2021-07-20Merge remote-tracking branch 'occivink/nop-ignore-unknown-switches'Maxime Coste
2021-07-20Prevent overwriting existing file in :write <explicit filename>Maxime Coste
Add a -force (equivalent to w!) switch that enables overwriting.
2021-07-20Remove unnecessary forward declarationMaxime Coste
2021-07-20Add missing new/delete overload in UseMemoryDomainMaxime Coste
2021-07-20Remove some unnecessary string copies in TerminalUIMaxime Coste
2021-07-20Generate different parse_quoted_balanced for each quote pairMaxime Coste
This seems to slightly improve parse speed which is where kakoune spends most of its time during startup.
2021-07-20Improve code-generation for StringsMaxime Coste
Make String::Data use trivial copy of the short/long union to avoid unnecessary branching there, inline release() as it can be elided by the compiler on moved-from Strings.
2021-07-19nop: ignore unknown switches instead of failingOlivier Perret
2021-07-14Fix blitting of windows halfway through double-width codepointMaxime Coste
Display a whitespace in place of the uncovered half of the codepoint. (I know this is incorrect and we should be considering grapheme clusters instead of codepoints, but this is a far bigger refactoring and another can of worms to handle with terminal emulators). Fixes #4262
2021-07-12Refactor TerminalUI::set_ui_optionsMaxime Coste
Take advantage of Optional monadic operations
2021-07-12Add 'terminal_synchronized' ui_option to opt-in synchronized outputMaxime Coste
Synchronized output does not work well with various terminals (including the linux console). It should also be unnecessary when not going through a slow link. This will eventually be removed if it is not proven to be useful to some users.
2021-07-12src: Support strikethrough facesJason Felice
2021-07-12Fix crash when displaying a menu on a too small terminalMaxime Coste
The code could position the menu at a negative line leading to invalid array accesses.
2021-07-12Small cleanups in terminal uiMaxime Coste
2021-07-12Do not trust saved active face when force redrawingMaxime Coste
2021-07-12Slight code simplificationMaxime Coste
2021-07-12Fix race on resize in terminal uiMaxime Coste
2021-07-12Fix force redraw handlingMaxime Coste
Fixes #3559
2021-07-12Tolerate bliting window that overflow the targetMaxime Coste
Although we try to avoid those, ensuring it never happens is tricky, and tolerating them avoids the crash. Fixes #3498
2021-07-12terminal_ui.cc: fix build on musl libcKylie McClain
2021-07-12terminal_ui: restore termios settings before suspending Kakoune.Tim Allen
TerminalUI::suspend() is responsible for undoing all Kakoune's modifications to the terminal state, actually suspending the process, then re-applying all the modifications after Kakoune wakes back up. Previously, the "undo" and "reapply" steps for termios settings were both after the suspend point, so on some platforms they were incorrect when the user arrived back at the shell prompt. Now, the termios "undo" step is back before the suspend point, and the undo and reapply steps should be in exactly reversed order. Fixes #3488.
2021-07-12Use iTerm2 "synchronised update" sequences around redraws.Tim Allen
In terminals that support it, this sequence causes the terminal to not redraw *its* output until the application has finished, reducing redraw flickering. The sequence is defined in: https://gitlab.com/gnachman/iterm2/-/wikis/synchronized-updates-spec ...and is apparently also supported by kitty and libVTE. Fixes #3482.
2021-07-12Handle skipped characters with erase line (EL) instead of insert blank (ICH)Maxime Coste
insert blank seems to behave differently between terminals and would be less efficient because it still has to shift all following characters (that we will overwrite anyway). Fixes #3437
2021-07-12Reduce amount of SGR escapes emitted by tracking the active faceMaxime Coste
2021-07-12Remove explicit whitespace padding in menu/infoMaxime Coste
Rely on the backend to clear content to eol
2021-07-12Use CSI @ instead of emitting lots of spacesMaxime Coste
This greatly reduces the amount of data written for a redraw especially on big terminals where most of the data is trailing blanks
2021-07-12Remove the concept of cursor in TerminalUI::WindowMaxime Coste