Commit Graph

4737 Commits

Author SHA1 Message Date
Maxime Coste
f87e844244 Add a text in scratch buffer to make it explicit it wont be saved
Fixes #2759
2019-03-17 10:41:11 +11:00
Maxime Coste
a8ea599372 Remove another unnecessary ; in palete reset escape sequence
Should fix #2779 for real.
2019-03-16 11:57:31 +11:00
Maxime Coste
525684f4da Make keymap fully constexpr 2019-03-16 11:54:56 +11:00
Maxime Coste
47be98f1fc Remove unnecessary ; from palette reset escape sequence
Fixes #2779
2019-03-13 07:19:20 +11:00
Maxime Coste
21fa4dcb13 Re-introduce -MP in the C++ compilation rule
It turns out it is important to avoid having to clean when a header
is deleted.
2019-03-05 20:56:44 +11:00
Maxime Coste
8a0e89f326 Merge remote-tracking branch 'laelath/compilation-warnings' 2019-03-05 20:54:14 +11:00
Maxime Coste
ffb1813759 Merge remote-tracking branch 'krobelus/write-all-note-modified' 2019-03-05 20:50:15 +11:00
Maxime Coste
4843149b6a Make error description available as "%val{error}" during catch blocks
Fixes #2761
2019-03-05 20:46:23 +11:00
Maxime Coste
f9d421130f Fix use of invalidated iterators in highlight_range
Fixes #2755
2019-03-05 20:31:40 +11:00
Justin Frank
6a3c3a3f82 -MP compile option isn't needed since header files aren't globbed 2019-02-27 22:46:04 -08:00
Justin Frank
8178400f8d Fixed all reorder warnings 2019-02-27 22:45:31 -08:00
Justin Frank
29342836a6 Fixed Selection being defined as a struct and class 2019-02-27 22:45:31 -08:00
Johannes Altmanninger
b849099472 Document that write-all only writes modified buffers 2019-02-25 10:59:45 +01:00
Jason Felice
7cf6eddc30 Add object mode expansions 2019-02-17 20:18:19 -05:00
Maxime Coste
e169a1893b Merge remote-tracking branch 'eraserhd/object-command-submode' 2019-02-17 11:22:02 +11:00
Maxime Coste
1ad3b87302 Collapse jumps based on current index change
The previous method, while likely more correct, could restore jump
lists containing references to already removed buffers.
2019-02-17 11:21:26 +11:00
Maxime Coste
924f30840b Fix uses of std::remove_if
std::remove_if is not std::partition, it makes no guarantees on
the state of the objects past the new end (they usually are in a
moved-from state).
2019-02-17 11:21:26 +11:00
Maxime Coste
8135a44c6c Run WinClose hook before putting the window into trash 2019-02-17 11:21:26 +11:00
Jason Felice
000aa2282c Add object command 2019-02-14 09:32:04 -05:00
Maxime Coste
89cd68d8af Check the return value of the rename call 2019-02-12 21:05:47 +11:00
Maxime Coste
4dae2c875b Introduce a writemethod option to either overwrite or replace files
This permit to choose if files should be written by overwriting their
content (the default), or by writing to a separate temporary file
and rename it to the current file.

As discussed in #2036
2019-02-12 21:01:19 +11:00
Maxime Coste
e8f26cbae7 Refactor write_buffer_to_file to use a flags param
That is clearer than two boolean parameters.
2019-02-12 20:18:34 +11:00
Maxime Coste
94796509a0 Fix bug in 'itersel' handling that could result in unsorted selections 2019-02-11 21:48:09 +11:00
Maxime Coste
5c0175d90a Remove peephole regex optimization pass
The current implementation is wrong as it crosses basic blocks
boundaries. Doing basic block decomposition of regex is probably
a tad too complex for this single optimization.

Fixes #2711
2019-02-04 22:10:19 +11:00
Maxime Coste
d9d2140ea2 Fix regex not always selecting the leftmost longest match
(Actually the rightmost longest match when searching backwards)

Fixes #2710
2019-02-04 17:33:29 +11:00
Maxime Coste
4cb402ac1a Remove references to SelectionList from selectors 2019-02-04 12:52:55 +11:00
Maxime Coste
7f9fe32f2d Remove target_eol and small code cleanups 2019-02-04 12:52:48 +11:00
Maxime Coste
7b1af1c32c Merge remote-tracking branch 'JJK96/documentation' 2019-02-03 09:53:09 +11:00
Jan-Jaap Korpershoek
b171824d8b Add missing [<switches>] argument to declare-option 2019-01-25 00:03:20 +01:00
Maxime Coste
b91367f8a3 Replace std::mem_fn with custom lambda in ranges 2019-01-24 23:24:50 +11:00
Maxime Coste
3e89148d74 Fix missing errno include 2019-01-24 23:24:50 +11:00
Maxime Coste
aa4885fd65 Add missing locale include to main.cc 2019-01-24 23:04:31 +11:00
Maxime Coste
c7f4d4dd27 Fix array_view dependency on std::min 2019-01-24 22:55:20 +11:00
Maxime Coste
346c78f5e0 Header and dependency cleanup 2019-01-24 21:22:20 +11:00
Maxime Coste
4b72cfe530 Replace std::tie with structured bindings 2019-01-24 21:21:59 +11:00
Maxime Coste
90dd084993 Only embed gdb script on ELF targets, and add missing gdb symlink 2019-01-23 20:59:32 +11:00
Maxime Coste
ebc9f7703b Embed gdb pretty-printing script directly into Kakoune binary
This will get stripped correctly, and should make debugging easier.
2019-01-23 20:27:16 +11:00
Maxime Coste
36e9e7eaf9 Change pipe diffing to work linewise
This should greatly improve performances as we only need to diff
lines instead of individual characters.

Closes #2678
Fixes #2037
2019-01-23 20:20:54 +11:00
Maxime Coste
370d10ccc7 Always select inserted text after piping
Relying on general selection update code is error prone due to
diffing.

Fixes #2394
2019-01-23 20:14:08 +11:00
Maxime Coste
c07f052de7 Default to release build
Fixes #2701
2019-01-22 19:41:58 +11:00
Maxime Coste
eb8f785e91 Try to bypass clang crash 2019-01-20 22:59:28 +11:00
Maxime Coste
77b1216ace Add a peephole optimization pass to the regex compiler 2019-01-20 22:59:28 +11:00
Maxime Coste
0364a99827 Refactor regex find next start not to be an instruction anymore
The same logic can be hard coded, avoiding one thread and 3
instructions, improving the regex matching speed.
2019-01-20 22:59:28 +11:00
Maxime Coste
fd043435e5 Split compile time regex flags from runtime ones 2019-01-20 22:59:28 +11:00
Maxime Coste
8c2603ab3c Support re-using the same ThreadedRegexVM for multiple iterations
This should reduce the number of allocations as the memory allocated
for the thread stack and the saves can be re-used between runs instead
of being cleared every time.
2019-01-20 22:59:28 +11:00
Maxime Coste
30897fd820 Fix warning on gcc 8 2019-01-20 22:59:28 +11:00
Maxime Coste
7b29192c24 Fix use of removed std::random_shuffle 2019-01-20 22:59:28 +11:00
Maxime Coste
2afc147b2c Refactor parsed regex children iteration to use regular range-for loops 2019-01-20 22:59:28 +11:00
Maxime Coste
566268d7bc Refactor RegexIterator to use a Sentinel 2019-01-20 22:59:28 +11:00
Maxime Coste
3babd0685c Switch to compilation standard to C++17 2019-01-20 22:59:28 +11:00