Commit Graph

3208 Commits

Author SHA1 Message Date
Maxime Coste
511367f977 Change end of line format detection logic to match vims
Only consider a buffer to be Crlf if *all* of its lines use it, else
consider it as Lf with embedded Cr chars.

Fixes #686
2016-06-28 20:46:20 +01:00
Frank LENORMAND
eca7850203 Fix a warning about the forward declaration of SelectionList 2016-06-27 20:59:46 +01:00
Maxime Coste
e07ff0c669 Use tparm instead of tiparm as built in OSX ncurses does not support it 2016-06-27 20:59:02 +01:00
Maxime Coste
089eaa52e0 Detect recursive hook run and abort in that case
Fixes #709
2016-06-27 20:55:07 +01:00
Maxime Coste
fcf73c2293 Refactor context_wrap to share more code between draft/non draft case
Fixes #706
2016-06-22 22:27:43 +01:00
Maxime Coste
a8cf2a84c4 Add an Optional::emplace method 2016-06-22 22:17:13 +01:00
Maxime Coste
5cb9cf4cc3 Go back to saving built-in registers by default in non draft :exec/:eval 2016-06-22 19:57:21 +01:00
Maxime Coste
532ae5a1a6 Do not go backward to when selecting to end of line from the end of line
Fixes #699
2016-06-22 19:56:40 +01:00
Maxime Coste
c032306e04 Merge remote-tracking branch 'doppioandante/fix-json' 2016-06-21 23:51:15 +01:00
Maxime Coste
b77eff1b72 Fix parameter order in fputs 2016-06-21 00:47:46 +01:00
Maxime Coste
2edea2e0f6 Use fputs and fflush in ncurses_ui direct stdout access to respect buffering
Ncurses will write using the FILE* interface, using the fd based one is error
prone.

Fixes #703
2016-06-20 23:43:21 +01:00
Maxime Coste
91bf0d4622 Make window scope available to draft contexts
We do want window options/aliases/keymaps/hooks to be available in
draft context, dont we ?

Fixes #702
2016-06-20 19:45:15 +01:00
Maxime Coste
fef37e6a92 Do not preserve registers by default when exec/eval in a non draft context
Fixes #700
2016-06-20 19:40:49 +01:00
Enrico Lumetti
97680827b8 Fix JSON integer parsing 2016-06-20 16:59:32 +02:00
Maxime Coste
471c75d738 Trim trailing end of lines in %sh outputs
Fixes #698
2016-06-19 17:01:56 +01:00
Maxime Coste
b8908f2dc6 Add a String::resize method 2016-06-19 17:01:27 +01:00
Maxime Coste
f2ba54b2d4 Keep prompt displayed on <c-r> and <c-v> in prompt mode 2016-06-18 11:07:18 +01:00
Maxime Coste
34c8e6a9cf Clear up info/menus and eventual prompts when reseting to normal mode
Fixes #697
2016-06-16 19:35:43 +01:00
Maxime Coste
04d24b22bd Fix parsing of empty json objects/arrays and recover parse errors
Fixes #694
2016-06-11 13:42:25 +01:00
Maxime Coste
3059b3a253 Extract ui type parsing to its own function 2016-06-11 13:22:24 +01:00
Maxime Coste
c73e64882c Check session valididty on kak -l and support kak -clear for clearing the dead ones
Fixes #689
2016-06-06 19:28:56 +01:00
Maxime Coste
e2bfd9e3b2 Diagnose empty selection desc string
Fixes #690
2016-06-06 17:17:18 +01:00
Maxime Coste
5cab2078f8 Fix string view created from a temporary string
This is clearly a case where rust style lifetime analysis would
have been nice, hopefully it comes with GSL lifetime extensions...

Fixes #680
2016-05-24 22:36:20 +01:00
Maxime Coste
fa35330b42 Fix RankedMatch ordering where 'a < a' was true
Fixes #679
2016-05-20 18:42:01 +01:00
Maxime Coste
7280525672 Dont overwrite registers with empty macros
Fixes #674
2016-05-20 09:44:05 +01:00
Maxime Coste
6181781f3d Change dir to $HOME when no parameters are given to cd
Fixes #678
2016-05-20 09:41:29 +01:00
Maxime Coste
365887539b Reject '//' as a file completion prefix to avoid cygwin network hosts listing 2016-05-19 21:46:27 +01:00
Maxime Coste
1834a67b87 Go back to libc locale and use c_regex_traits
Unfortunately, cygwin does not support c++ locales.
2016-05-19 21:45:23 +01:00
Maxime Coste
e1703204f8 fix bug in utf8_iterator 2016-05-19 20:20:42 +01:00
Maxime Coste
fb01c8c377 Do not force recreate scratch buffers by default, require edit! for that 2016-05-17 19:41:24 +01:00
Maxime Coste
49e674fe55 Fix RankedMatch::operator< with matching prefix candidates 2016-05-17 19:40:36 +01:00
Maxime Coste
f51ba6089c Use variadic macros for kak_assert to remove the need for COMMA 2016-05-17 19:39:55 +01:00
Maxime Coste
3b6d6956e2 We do need a force redraw on resize for menu, info and status bar 2016-05-16 10:23:47 +01:00
Maxime Coste
8c6849bb04 Make HookManager safe counted 2016-05-15 10:37:42 +01:00
Maxime Coste
baf219ee2f Fix duplicate buffer problem, fix real_path beahviour 2016-05-15 10:37:01 +01:00
Maxime Coste
1788126f38 BufferManager now owns the Buffers instead of registering them 2016-05-14 08:33:50 +01:00
Maxime Coste
ba421e45f7 Delay window deletion until we get back to main loop
Avoid WinResize hooks while redrawing, ensure window resize only
take place while handling user input.

Fixes #672
2016-05-14 08:17:52 +01:00
Maxime Coste
4c8089009d Tolerate failure in setting current locale 2016-05-12 00:00:03 +01:00
Maxime Coste
84f62e6ff2 Use C++ locale based functions instead of the libc ones 2016-05-11 09:49:45 +01:00
Maxime Coste
6b1bd84e8e Allow access to end of line with horizontal moves (h and l)
Lets enable that for some time, get some feedback on that behaviour
change, and see if we keep it.
2016-05-11 00:03:45 +01:00
Maxime Coste
dd41a46c4c Correctly set c++ locale on startup
Fixes #595
2016-05-10 22:06:02 +01:00
Maxime Coste
abac6a9436 Use boost::wregex implementation and manually utf8 decode into it
That way we get proper unicode support in regular expressions as long
as the current locale treats wchar_t as unicode codepoints.

Fixes #638
Fixes #595
Fixes #162
2016-05-10 09:38:21 +01:00
Maxime Coste
bff9d45bdb Make utf8_iterator codepoint type and difference type configurable 2016-05-09 21:56:08 +01:00
Maxime Coste
e3cddf3783 Fix use of potentially null local_client
Fixes #667
2016-05-09 13:56:15 +01:00
Maxime Coste
d3aff03062 Keep a pointer to current client in windows so that window hooks can access it 2016-05-09 13:48:48 +01:00
Maxime Coste
457e11bdc9 time window display buffer update in debug profile mode 2016-05-06 00:24:54 +01:00
Maxime Coste
a132eb6b5b Expose a WinResize hook when a window changes size
Fixes #661
2016-05-04 23:27:28 +01:00
Maxime Coste
d4e9f30e5f Merge branch 'master' of git://github.com/pierroelmito/kakoune 2016-05-04 23:20:49 +01:00
pierroelmito
3044eff356 fix whitespace label
The author of this work hereby waives all claim of copyright (economic and moral) in this work and immediately places it in the public domain; it may be used, distorted or destroyed in any manner whatsoever without further attribution or notice to the creator
2016-04-30 11:59:53 +02:00
Maxime Coste
25a31534ec Fix splitting selecting the first buffer char when there is a match at buffer begin 2016-04-30 10:37:31 +01:00
pierroelmito
d4b8e28d0a add face to change whitespace colors 2016-04-30 10:35:25 +02:00
Maxime Coste
da40828801 Check all buffer are saved in :kill, and add :kill! to avoid that 2016-04-29 21:58:04 +01:00
Maxime Coste
61c155fc40 Fix wrap_lines 2016-04-27 13:55:32 +01:00
Maxime Coste
75d22a8da7 Add another missing include in shell_manager.cc 2016-04-27 09:46:53 +01:00
Maxime Coste
cf142872dc Add missing include in file.cc 2016-04-27 09:46:53 +01:00
Maxime Coste
e01a658cea Make use of strongly typed number to size_t conversion 2016-04-27 09:46:53 +01:00
Maxime Coste
717e37f2f3 Add checked, explicit conversion from strongly typed number for size_t 2016-04-27 09:46:53 +01:00
Maxime Coste
21644d17d6 Fix comparison operators in utf8_iterator and tag it as bidirectional 2016-04-27 09:46:53 +01:00
Maxime Coste
e4b9e30b31 Fix missing include in json_ui.cc 2016-04-21 20:46:41 +01:00
Maxime Coste
de033d2915 Allow equality comparison between buffer iterators from differnt buffers 2016-04-21 20:42:23 +01:00
Maxime Coste
a22b1b6bc8 Fix BufferIterator::difference_type, it should be signed 2016-04-21 20:42:16 +01:00
Maxime Coste
66a40a37cd prompt: zero password memory after running the command to be slightly more secure 2016-04-20 13:31:34 +01:00
Maxime Coste
199ccb4021 Add a -password switch to :prompt to allow for more secure password entering
Fixes #660
2016-04-19 09:51:09 +01:00
Maxime Coste
2435949fae Add support for env var name completion
Fixes #659
2016-04-17 19:21:43 +01:00
Maxime Coste
e784db4ad6 Use common completion system for OptionManager::complete_option_name 2016-04-17 19:21:08 +01:00
Maxime Coste
013519b3cb Remove iterator based regex constructor 2016-04-16 21:41:04 +01:00
Maxime Coste
f877c388fe Fix mistake in input_handler.cc 2016-04-13 23:50:49 +01:00
Maxime Coste
7833b53272 Fix support for macro being recorded and replay during :exec (non draft) 2016-04-13 21:21:49 +01:00
Maxime Coste
b0060ed79e Fix modified range computation when erasing multiple times past current buffer end
Fixes #654
2016-04-13 21:21:00 +01:00
Maxime Coste
d1b693270e ShellManager: do not open child stdin if there is no data to write to it
Fixes #383
2016-04-12 13:41:21 +01:00
Maxime Coste
a2d426abba Use padding face on the whole line 2016-04-11 21:12:27 +01:00
Maxime Coste
064e965500 Remove padding control options from ncurses ui 2016-04-11 13:54:47 +01:00
Maxime Coste
815924e4da Merge remote-tracking branch 'lenormf/buffer-padding' 2016-04-11 13:44:10 +01:00
Maxime Coste
d4b1138e2f Use a specific startup_error exception type to get a nicer message
Fixes #424
2016-04-09 09:13:35 +01:00
Maxime Coste
c51ca6b3fa Fix is_word ambiguous overload 2016-04-09 07:57:55 +01:00
Maxime Coste
c768ff9b6f Small style tweak, we know buffer begin coord is always {0,0} 2016-04-09 01:08:38 +01:00
Maxime Coste
a12475d88c Merge branch 'expose-cursor-byte-offset' of git://github.com/pauldub/kakoune 2016-04-09 01:05:18 +01:00
Maxime Coste
0a863c21e4 fix word completion taking the words being edited as candidates 2016-04-09 01:03:24 +01:00
Maxime Coste
a36ee22760 Pass the selection list to insert mode completer functions 2016-04-09 01:03:24 +01:00
Paul d'Hubert
eb8ad56c87 expose cursor_byte_offset env variable
Update README.asciidoc
2016-04-08 13:29:31 +02:00
Maxime Coste
3eca90f2b1 Only offer directories when completing :cd arguments
Refactor code in file.cc, avoid many double stat when searching
commands

Fixes #646
2016-04-07 22:47:41 +01:00
Maxime Coste
989d64abd4 Tweak RankedMatch behaviour 2016-04-04 13:42:58 +01:00
Maxime Coste
0478a8f11a Give priority to lower case in RankedMatch 2016-04-04 13:42:58 +01:00
Maxime Coste
ab5daeb365 Refactor wrap_lines and add some unit tests 2016-04-04 13:42:58 +01:00
Maxime Coste
15e82518d3 Tweak categorize(Codepoint) implementation 2016-04-04 13:42:58 +01:00
Maxime Coste
b5a68307ba Use a specific option type completions for insert completion
Fix escaping in jedi.kak as well
2016-04-04 13:42:58 +01:00
Maxime Coste
d1732673ce Document the null register 2016-03-31 09:21:09 +01:00
Maxime Coste
8badcdc0d5 Make DynamicRegister statically dispatch to its function 2016-03-31 09:17:02 +01:00
Maxime Coste
9b4bd611ef Replace menu and info when they actually moved
Previous logic worked only when the buffer moved in the window, but
not if some highlighter (like line numbering or flag lines) moved
the text around.
2016-03-30 19:46:43 +01:00
Maxime Coste
5332378419 Fix spaces_to_tabs implementation accessing past end
Fixes #643
2016-03-30 19:27:36 +01:00
Maxime Coste
7dd05d675c RankedMatch constructor handles empty query just fine 2016-03-29 13:48:01 +01:00
Maxime Coste
94f4531bc8 Tweak subsequence_match_smart_case 2016-03-28 15:18:15 +01:00
Maxime Coste
2a9875bd58 Use manual lexicographic comparison in RankedMatch::operator< 2016-03-28 14:44:49 +01:00
Maxime Coste
75e9bbfa43 Uniquify candidates in -shell-candidates mode 2016-03-28 14:16:45 +01:00
Maxime Coste
1bd356473b Use UsedLetters for shell-candidates filtering 2016-03-25 20:38:27 +00:00
Maxime Coste
c756f8f124 Move UsedLetters with RankedMatch 2016-03-25 20:38:27 +00:00
Maxime Coste
d3ef2d36ea Add a SplitView container view 2016-03-25 20:38:26 +00:00
Maxime Coste
87704227ad Tweak implementation of subsequence_match_smart_case
Remove use of utf8 iterators and use directly utf8 functions
2016-03-24 23:45:56 +00:00
Maxime Coste
e5afacba70 Optimize split implementation, avoid growing strings char by char 2016-03-24 23:25:58 +00:00
Maxime Coste
7b52b00b94 Small code tweak 2016-03-24 22:15:11 +00:00