Commit Graph

3544 Commits

Author SHA1 Message Date
Maxime Coste
d470bd2cc9 Make numeric registers setable
Fixes #1214
2017-02-14 00:02:01 +00:00
Maxime Coste
e3a04dfa65 Fix RegisterRestorer not handling potential throws on register assign
This should fix part of #1214
2017-02-13 23:31:16 +00:00
Maxime Coste
4f18e56320 Fix non-returning parse_key lambda 2017-02-13 14:02:09 +00:00
Maxime Coste
2edb7d62ef Add support for -on-change and -on-abort to prompt
Fixes #1209
2017-02-12 12:51:58 +00:00
Maxime Coste
9ba1665e58 Refactor show_whitespaces a bit 2017-02-09 23:52:38 +00:00
Maxime Coste
6163134f30 Merge remote-tracking branch 'lenormf/show-whitespaces-flags' 2017-02-09 23:33:08 +00:00
Maxime Coste
4ae441db68 Merge remote-tracking branch 'Delapouite/decl-completer' 2017-02-09 23:26:12 +00:00
Maxime Coste
86bba5d9d2 Merge remote-tracking branch 'Delapouite/line-flags' 2017-02-09 23:26:05 +00:00
Delapouite
0cf94292e4 Add command completer for types to declare-option 2017-02-09 10:18:13 +01:00
Delapouite
cfb2b4fade Fix missing new line char in declare_option_cmd info 2017-02-09 09:01:49 +01:00
Maxime Coste
1c63d28f15 Fix Buffer::offset_coord that was dropping the target coordinate 2017-02-07 23:13:14 +00:00
Maxime Coste
5342d67fa4 Remove unneeded padding in relative line numbers highlighting
We were still adding one more char to the line number width in case
it would contain a minus sign. The minus signs are not used anymore
in relative line numbering so we dont need to keep that addtional
char which is always a blank.
2017-02-07 23:01:23 +00:00
Maxime Coste
ce2b85ddac Add -match-capture support for regions higlighter
Closes #837
2017-02-06 23:00:13 +00:00
Maxime Coste
45b145f540 Small layout tweak for Buffer::HistoryNode 2017-02-06 13:33:20 +00:00
Frank LENORMAND
5d86b58a38 Allow modifying the characters used when highlighting whitespace
This commit adds the following flags to the `show_whitespaces`
highlighter, with a one character long parameter:

 * `-lf`: character replacing line feeds
 * `-spc`: character replacing spaces
 * `-nbsp`: character replacing non breakable spaces
 * `-tab`: character replacing a tabulation
 * `-tabpad`: character used as padding after a tabulation to satisfy
              the `tabstop` option
2017-02-04 10:21:13 +03:00
Maxime Coste
cb2e1a17b3 Fix some bugs in non blocking pipe writing 2017-02-03 18:40:03 +00:00
Maxime Coste
f500af9023 Merge remote-tracking branch 'ekie/move_buffer_end' 2017-02-03 13:49:33 +00:00
Maxime Coste
c793ef3aa8 Store shell-candidates completions in the Completion memory domain 2017-02-03 13:42:47 +00:00
Maxime Coste
02b7e58481 Make piping data into shell commands non blocking
Fixes #1180
2017-02-03 01:14:42 +00:00
Maxime Coste
d90919568a Also execute prompt callback when just starting
incsearch will immediatly display the result of using an empty
string (reusing the search register content).

Fixes #1174
2017-02-01 23:04:37 +00:00
Maxime Coste
bc0dfa9e8f Use <a-'> for backward rotate selection and move rotate content to <a-"> 2017-02-01 22:53:42 +00:00
Maxime Coste
65bbc19d6f Change n behaviour to only select next match for main selection
Select next match for all selections is still available as /<ret>
Fixes #1173
2017-02-01 20:00:05 +00:00
Maxime Coste
6a0354a597 Tweak ranked match ordering 2017-01-31 22:30:23 +00:00
Maxime Coste
472f5149c0 Formatting fix 2017-01-31 21:46:20 +00:00
Maxime Coste
f44415cee4 Add some noexcept to pointer policies 2017-01-31 21:45:55 +00:00
Eike Plack
01eceebf75 Support the vim behaviour for +line syntax
* Ommitting the linenumber will move to buffer end
2017-01-31 19:44:27 +01:00
Maxime Coste
34870eb353 Rework NCurses key parsing to properly handle <a-special key> 2017-01-30 13:38:56 +00:00
Maxime Coste
f30e164232 Make SharedString::create take a list of StringViews 2017-01-30 13:38:38 +00:00
Maxime Coste
9d09d14d99 Warning fix in ranked_match.cc 2017-01-30 11:22:14 +00:00
Maxime Coste
192ea9a9d9 Fix explicit insert completion menu/info not hiding
Fixes #1168
2017-01-30 10:32:29 +00:00
Maxime Coste
632e05d830 Fix infinite loop when comparing RankedMatches containing invalid utf8
If we had a word containing some invalid utf8, like a wrong sequence
of continuation bytes, we would infinitely loop back to the previous
valid character start.

Fixes #1157
2017-01-29 23:50:33 +00:00
Maxime Coste
1ff60ff592 Fix some uninitialized values 2017-01-29 23:37:42 +00:00
Maxime Coste
cb395d39f8 Use iswlower instead of islower
islower can crash with big codepoints, and is incorrect anyway.
2017-01-29 23:37:10 +00:00
Maxime Coste
565d835d57 Fix option name in haskell.kak 2017-01-29 16:10:48 +00:00
Maxime Coste
0051a4f896 Remove unneeded assignment to null in RefPtr::release 2017-01-29 14:26:41 +00:00
Maxime Coste
2052b225d9 Detect too deep command call stack
Fixes #1163
2017-01-29 13:56:05 +00:00
Maxime Coste
753f3a50d1 Make StringView and unit types trivial types 2017-01-29 13:49:45 +00:00
Maxime Coste
0cb192921a Remove unused WindowAndSelections timestamp field
The SelectionList already has a timestamp.
2017-01-29 12:50:16 +00:00
Maxime Coste
2b6fc6beb7 Remove unused Diff::posA field 2017-01-29 12:49:52 +00:00
Maxime Coste
68b92b9ac1 Make BufferIterator only a bidirectional iterator
Distance computation is too expensive on BufferIterators to
treat them as random access.
2017-01-28 13:06:03 +00:00
Maxime Coste
072064407a Remove hash from StringData
Maintaining the hash value of strings is not worth it as we only
use it for buffer reload, but pay for it on any buffer modifications.
2017-01-28 13:04:55 +00:00
Maxime Coste
125c8b7e80 Fix fifo reading not handling potential errors from the read call
Fixes #1153
2017-01-25 13:55:20 +00:00
Maxime Coste
aa7241067e Only restore cursor position after an append if we still have cursor > anchor
Fixes #1158
2017-01-25 13:36:06 +00:00
Maxime Coste
ebcfba12f6 Add a RawKey hook for raw user input hooking
Fixes #1132
2017-01-24 23:57:36 +00:00
Maxime Coste
8a62ec12af Fix shell context capture that was accessing dead parameters
Fixes #1156
2017-01-24 20:20:50 +00:00
Maxime Coste
bbbb513990 Fix crash when clearing a regex prompt with multiple selections
Fixes #1124
2017-01-24 19:18:29 +00:00
Maxime Coste
7ba24c043a Add gi to go to first non-blank character on line
Fixes #407
2017-01-22 23:53:08 +00:00
Maxime Coste
66e422e397 Fix client destruction when there is an InsertMode mode still alive 2017-01-22 12:19:23 +00:00
Maxime Coste
e8ee8c23d8 Support the +line syntax for clients as well.
Fix a crash on daemon quit as well.
2017-01-21 12:17:49 +00:00
Maxime Coste
c6a7924b80 Fix SafeCountable callstack tracking 2017-01-21 12:10:24 +00:00
Maxime Coste
6f4515f005 Only touch new clients selections when target coord are explicit
Do not implicitely change new clients selections to target coordinates
when the user did not specify them, so that we can re-use the selections
from the found free window, which is the generally desired behaviour.
2017-01-19 18:44:26 +00:00
Maxime Coste
7316afd17b Use ints instead of unsigned for capture count 2017-01-16 18:49:27 +00:00
Maxime Coste
c24a636cb9 Fix regex search/select not restoring initial selections on abort
And incrementally set the search register for select/split as well
2017-01-16 13:57:14 +00:00
Frank LENORMAND
0b22938bce Remove the option that excludes the -pedantic flag from CXXFLAGS
Allowing compilation without the `-pedantic` flag was a temporary trick
to work around a bug involving `libstdc++` and `musl`. A fix has been
pushed for the issue in the appropriate repositories, we no longer need
the optional non-pedantic compilation option.
2017-01-14 11:55:20 +03:00
Maxime Coste
e7e72747ed Update ranges highlighter options according to buffer changes 2017-01-13 13:52:55 +00:00
Maxime Coste
ffc362cf9e Propagate ShellContext custom env-vars through custom commands
Fixes #1131
2017-01-13 00:26:43 +00:00
Maxime Coste
4916ea1766 Fix capture group handling
Fixes #1129
2017-01-13 00:17:31 +00:00
Maxime Coste
8c55acb076 Detect empty selection lists when restoring selections from registers
Fixes #1123
2017-01-11 13:43:41 +00:00
Maxime Coste
343df600cb Merge remote-tracking branch 'alexherbo2/command-names' 2017-01-10 13:44:11 +00:00
Maxime Coste
fb773367e7 Merge remote-tracking branch 'Delapouite/pipe-register' 2017-01-10 13:35:44 +00:00
Maxime Coste
37fbe6c6eb Treat <c-h> as backspace in ncurses ui
Fixes #1030
2017-01-10 13:35:10 +00:00
Delapouite
f51d03b0d8 Fix: add missing pipe register in info 2017-01-10 12:34:37 +01:00
Maxime Coste
9f0bca53c4 Small code cleanups 2017-01-08 23:26:15 +00:00
Maxime Coste
dcd8f6ef01 Apply clang-tidy modernize to the codebase 2017-01-08 22:39:01 +00:00
Maxime Coste
f9f11aa762 Make the currently sourced file path available through $kak_source
The :source command sets an 'source' value to the real path of the
file getting sourced while its commands are executed.

Fixes #1112
2017-01-06 19:46:47 +00:00
Maxime Coste
3123dbf4c2 Merge branch 'master' of git://github.com/hoop33/kakoune 2017-01-05 14:36:55 +00:00
Rob Warner
48d5e5b5a9 Use PREFIX to locate ncurses and boost on macOS 2017-01-05 09:30:58 -05:00
Maxime Coste
d991420140 Higher level implementation of attributes to json formatting 2017-01-04 23:19:18 +00:00
Rob Warner
a680d419e7 Allow non-standard homebrew location for boost and ncurses linking 2017-01-04 15:38:37 -05:00
Alex Leferry 2
671b50bb52 update command names 2017-01-04 13:04:27 +01:00
Maxime Coste
b3674a2f03 Add Modal InfoStyle used for bufer reload info box
Modal info style wont be replaced by other info boxes.
NCursesUI will center that info box.

Fixes #1060
2017-01-04 11:39:51 +00:00
Maxime Coste
1b9f363225 Fix bug relying on undefined arg evaluation order. 2017-01-03 23:17:08 +00:00
Maxime Coste
4295736c97 Fix handling of main selection when copying selection to next/previous lines
Fixes #1095
2017-01-03 18:41:45 +00:00
Maxime Coste
fc4dc93209 Merge remote-tracking branch 'casimir/makefile-osx' 2017-01-02 11:13:24 +00:00
Maxime Coste
20c47b8d61 better support for plain pointer iterators in containers.hh
use std::iterator_traits<T>::value_type instead of T::value_type
that will fail when T is not of class type.
2017-01-02 05:13:58 +00:00
Maxime Coste
ac1192f58a Ensure <esc> cancels in replace with char
After recent changes that associated <esc> with the 0x1b codepoint
r<esc> would replace each char with 0x1b instead of canceling the
replace command.
2017-01-02 04:03:02 +00:00
Maxime Coste
3c1f606a22 Move some template code out of selectors.hh into selectors.cc 2017-01-01 19:30:02 +00:00
Maxime Coste
cd89531bd9 Better handling of linewise inserting when we have multiple selections per line
Fixes #1053
2017-01-01 18:08:43 +00:00
Maxime Coste
cdb2c766a5 Refactor SelectionList::insert a bit 2017-01-01 17:31:47 +00:00
Maxime Coste
69789d4793 When inserting at the end, store the next line as end pos in the change 2017-01-01 16:32:04 +00:00
Maxime Coste
e42881fa38 Fix remaining uses of hardcoded /tmp to get the socket paths
Fixes #1097
2017-01-01 13:10:08 +00:00
Maxime Coste
968e573d80 Slight code refactor for paste handling 2017-01-01 12:58:04 +00:00
Martin Chaine
7b60ae0b5a use explicit flags for homebrew's boost on osx 2016-12-30 19:32:18 +01:00
Maxime Coste
76c58aa022 Dont use constexpr to fix OSX compilation 2016-12-30 13:29:57 +00:00
Maxime Coste
190a04d6c8 Add a ncurses_change_colors option that can disable color palette change
Closes #1057
2016-12-30 07:01:13 +00:00
Maxime Coste
ea6994dd3b Use a struct WorstMatch instead of varargs for the fallback option_add
varargs cannot handle non pod types.
2016-12-30 06:43:32 +00:00
Maxime Coste
4f98677642 Use 'not empty' in place of 'length > 0' 2016-12-27 22:01:11 +00:00
Maxime Coste
84c2ca1cdc Merge remote-tracking branch 'leira/empty_param_crash' 2016-12-27 22:00:32 +00:00
Maxime Coste
923665fab4 Merge remote-tracking branch 'kballard/readonly_warning_msg' 2016-12-27 21:54:26 +00:00
Maxime Coste
243bcf6a6d Support set -add on flag types
Fixes #1082
2016-12-27 21:52:53 +00:00
Kevin Ballard
b0c2444466 Change the message when entering insert mode while readonly 2016-12-27 12:23:15 -08:00
Maxime Coste
6beb9b6f02 Fix unmap 4th argument not being optional
Fixes #1078
2016-12-27 06:49:35 +00:00
Maxime Coste
fcd99d9c22 Use absolute distance for relative line numbering
Closes #1068
2016-12-26 22:10:25 +00:00
Leira Hua
f79018cffd Added string length check when checking switch params
Fixes #1051
2016-12-24 17:42:31 -08:00
Maxime Coste
25451ac112 Set the register incrementally as well during incremental search
Fixes #1054
2016-12-23 20:46:50 +00:00
Maxime Coste
33eb93b619 Skip debug buffer when cycling through the buffer list
Fixes #1059
2016-12-23 16:37:54 +00:00
Maxime Coste
d17bed9b80 Display the command prompt in error face when the command is not found
Fixes #1021
2016-12-23 16:23:31 +00:00
Maxime Coste
62df6dbb46 Display a message when entering insert mode while readonly
Fixes #1050
2016-12-21 06:39:58 +00:00
Maxime Coste
3a6167ae62 Merge branch 'master' of git://github.com/akkartik/kakoune 2016-12-20 20:15:54 +00:00
Maxime Coste
0daf7af493 Fix getting path confstr, the returned size includes the zero terminator
Closes #1047
2016-12-20 20:14:35 +00:00