Maxime Coste
695c85f451
Fix, cleanup and refactor compute_modifications
2014-05-24 02:14:28 +01:00
Maxime Coste
f08966197e
Change # register to contain selection number
...
Using <c-r># in insert will allow easy numbering
2014-05-23 20:27:35 +01:00
Maxime Coste
a7540962cc
Remove line modification, replaced by modification
2014-05-21 23:35:11 +01:00
Maxime Coste
aa64851de6
Use Modification for region highlighter
2014-05-21 23:35:11 +01:00
Maxime Coste
8f45623f98
update Modification for WordDB
2014-05-21 23:35:11 +01:00
Maxime Coste
2c52b8bca6
Add initial (and probably buggy) compute_modifications code
...
compute_modifications compiles a list of buffer change into
a list of Modifications that can be used for updating BufferCoord
2014-05-21 23:35:10 +01:00
Maxime Coste
152e46a6da
Make utif_iterator more tolerant to invalid utf8
2014-05-21 00:25:24 +01:00
Maxime Coste
55959f2cb1
Make expand_unprintable more tolerant to invalid utf8
2014-05-21 00:24:58 +01:00
Maxime Coste
b29cae4d16
Remove duplicated logic and fix insert in Replace mode
2014-05-19 18:59:14 +01:00
Maxime Coste
2bb2c467b6
Fix filename/colalias/buffer completion when completing with trailing text
2014-05-18 14:14:37 +01:00
Maxime Coste
03e5264df4
Remove per lines timestamp in Buffer
2014-05-17 12:17:05 +01:00
Maxime Coste
079d34b82a
Minor cleanup in SelectionList methods
2014-05-17 12:13:49 +01:00
Maxime Coste
211b78f536
Merge branch 'master' into remove-buffer-change-listener
...
Conflicts:
src/highlighters.cc
2014-05-17 11:39:56 +01:00
Maxime Coste
9240cccf74
set Coords/Counts methods as always_inline
...
They are well tested, and we never want to step into them when debugging
2014-05-17 10:17:28 +01:00
Maxime Coste
c21368cac5
DisplayAtom::content returns a StringView
2014-05-16 19:29:39 +01:00
Maxime Coste
aa48179131
read all available text in fifo each time the fd is signaled
2014-05-15 19:11:59 +01:00
Maxime Coste
2f1388df7b
replace LineChangeWatcher with a free function compute_line_modifications
2014-05-14 21:19:19 +01:00
Maxime Coste
0ec0f7c320
Remove unneeded vector for computing line modifications
2014-05-14 21:10:55 +01:00
Maxime Coste
4e280977a2
Iterate in reversed order on selections when modifing buffer
...
This way, update only needs to be called once everything is done
as we always modify after the next selection to be used.
2014-05-14 20:56:49 +01:00
Maxime Coste
c3f4ef9ba2
Remove BufferChangeListener
2014-05-14 19:49:04 +01:00
Maxime Coste
bf98b38afd
Use a plain SelectionList for Context, remove DynamicSelectionList
2014-05-14 19:49:04 +01:00
Maxime Coste
db423e4a88
utf8::is_character_start takes directly the char value
2014-05-14 19:49:03 +01:00
Maxime Coste
34e1c2ddd5
Fix RegexColorizer cache handling
2014-05-14 19:22:42 +01:00
Maxime Coste
fbf7856e3e
use plain SelectionList for regex_prompt
2014-05-14 00:27:41 +01:00
Maxime Coste
11d9b60766
Make it harder to have an invalid SelectionList
2014-05-13 23:22:54 +01:00
Maxime Coste
a06094b00e
Use simple SelectionList for the Context::JumpList
2014-05-13 20:09:37 +01:00
Maxime Coste
ea3e92aa5e
SelectionList know its buffer and timestamp
2014-05-13 20:09:06 +01:00
Maxime Coste
855357ee73
Fix :delbuf! not forcing buffer deletion
...
Fixes #116
2014-05-13 19:48:16 +01:00
Maxime Coste
016ede38d1
Fix show_matching highlighter when opening char is the first buffer char
...
Fixes #119
2014-05-13 19:45:32 +01:00
Maxime Coste
6b42c48c3f
Refactor DynamicRegexHighlighter, search hl uses Search colalias
...
fixes #122
2014-05-13 19:35:28 +01:00
Maxime Coste
7bc73b7ef9
negative coordinates are invalid
2014-05-13 19:01:27 +01:00
Maxime Coste
8ab1f58594
Use a Buffer::changes_since based implementation for undo/redo
2014-05-13 19:01:27 +01:00
Maxime Coste
67a251ffd5
Pass a at_end param to BufferChangeListener::on_{insert,erase}
2014-05-13 19:01:27 +01:00
Maxime Coste
ddd8f8d392
LineChangeWatcher uses Buffer::changes_since rather than listening
2014-05-13 19:01:27 +01:00
Maxime Coste
a510276025
Maintain an append-only list of changes in Buffer
2014-05-12 19:03:13 +01:00
Maxime Coste
db8a4ca318
SelectionList no longer inherit from std::vector
2014-05-12 18:59:00 +01:00
Maxime Coste
5e47c503d9
use words=all rather than words=buffer for default insert word completion
2014-05-11 12:53:08 +01:00
Maxime Coste
daac1698d6
use StringView in word_db.cc
2014-05-11 12:51:37 +01:00
Maxime Coste
f4d338e605
String::substr now returns a StringView
2014-05-11 12:44:51 +01:00
Maxime Coste
05b79921a9
Minor code cleanups in buffer.{cc,hh}
2014-05-10 16:25:07 +01:00
Maxime Coste
c7d24ac7db
Add a show_whitespaces highlighter
2014-05-09 13:50:12 +01:00
Maxime Coste
e4e609a35c
Catch std::runtime_errors that can be thrown by regex_search
...
This handle the case where a regex matching gets too complex.
2014-05-08 19:33:14 +01:00
Maxime Coste
4010117c98
fix tabs_to_space on consecutive tabs
2014-05-08 19:30:10 +01:00
Maxime Coste
8356e44ad5
Improve error reporting when parsing commands
...
*debug* will contain line and column informations along
with the responsible command name.
2014-05-07 20:39:59 +01:00
Maxime Coste
8546788b43
Refactor LineAndColumn coordinates
...
BufferCoord -> ByteCoord
DisplayCoord -> CharCoord
Moved their definition along with LineAndColumn into coord.hh
2014-05-07 19:53:45 +01:00
Maxime Coste
24f6471431
Add '$' for keeping selections that passes a shell command
...
'$' pipes each selections through a given shell command, and
only keeps the one that have an exit code of 0
Fixes #36
2014-05-05 18:09:03 +01:00
Maxime Coste
e6bda60ca4
Use c++ code for 'gf' command rather than running a user :edit command
2014-05-05 13:09:59 +01:00
Maxime Coste
dfb1246697
Complete option values with the current value of the option
...
Fixes #32
2014-05-05 12:55:04 +01:00
Maxime Coste
36620f8cc8
Wrap command completion containing spaces, semicolons or quotes in double quotes
2014-05-05 12:54:23 +01:00
Maxime Coste
7f0e82dd81
minor style tweak
2014-05-04 11:48:39 +01:00
Maxime Coste
e92e6c775a
Paragraph selection selects next paragraph when on previous end
2014-05-04 11:21:19 +01:00
Maxime Coste
8cc9454438
Add a -alias switch to the def command for defining an alias
...
Fixes #100
2014-05-03 16:00:10 +01:00
Maxime Coste
5db3b51843
Add command aliases in command info
...
Fixes #101
2014-05-03 16:00:03 +01:00
Maxime Coste
e83123de1f
Add support for non-scrolling fifo buffers
2014-05-02 18:58:04 +01:00
Maxime Coste
26dd21706e
Replace some typedefs with usings
2014-05-01 19:03:13 +01:00
Maxime Coste
67559daead
file.cc: try more portable use of struct stat::st_mtime
2014-04-30 23:03:42 +01:00
Maxime Coste
3efeb67861
Fix Option destructor that was not virtual
2014-04-30 19:40:23 +01:00
Maxime Coste
4d45fa6588
Use StringView in UserInterface and NCursesUI
2014-04-30 19:39:52 +01:00
Maxime Coste
bd4df27f2b
Use StringView in write_debug
2014-04-30 19:27:38 +01:00
Maxime Coste
c06f986a02
Add unistd.h to main, needed for dup
2014-04-30 19:08:06 +01:00
Maxime Coste
144a35be30
Fix clang compilation
2014-04-30 19:07:32 +01:00
Maxime Coste
b1ba7fc4d2
Fix word completion that replaced the whole current word
...
Only replace up to the cursor.
2014-04-29 23:48:46 +01:00
Maxime Coste
479c067a40
Add support for running Kakoune with redirected stdin
...
Will read to a *stdin* fifo buffer
2014-04-29 21:37:11 +01:00
Maxime Coste
f683946681
Extract insert completion code to insert_completer.{cc,hh}
2014-04-28 21:54:00 +01:00
Maxime Coste
512bfa0c65
Fix support for tabulation in insert completion candidates
2014-04-28 19:49:23 +01:00
Maxime Coste
53cb626f49
Add an expand_tabs string utility function
2014-04-28 19:49:00 +01:00
Maxime Coste
7190791927
Move some buffer related utility functions to buffer_utils.{cc,hh}
2014-04-28 19:48:23 +01:00
Maxime Coste
49bc7f8767
minor formatting cleanup
2014-04-27 12:37:58 +01:00
Maxime Coste
b370f91025
Add -init switch to :prompt to set the initial text
...
Fixes #97
2014-04-27 12:37:41 +01:00
Maxime Coste
0c1b27cfa7
Fix :map docs and add completion support
2014-04-26 09:40:26 +01:00
Maxime Coste
192e0c33f9
Cache commands in complete_commands
...
Iterating through all directories in path to find commands
can end up quite slow, so cache the result per directory and
update it only if the directory modification time changed.
2014-04-24 19:08:05 +01:00
Maxime Coste
418a04f49d
Support reading strings more that 2048 bytes
...
fixes #95
2014-04-23 22:21:04 +01:00
Maxime Coste
389308dfd8
Preserve current word in word completion if found elsewhere
...
If occurence count in the buffer if greater that one, do not
remove it from the matches.
2014-04-22 19:32:12 +01:00
Maxime Coste
65c818b859
Use StringView in CommandManager
2014-04-21 21:49:25 +01:00
Maxime Coste
8beda67fae
Use StringView in FunctionGroup and FunctionRegistry
2014-04-21 10:50:09 +01:00
Maxime Coste
a1ec45d91a
Use StringView in id_map
2014-04-21 10:47:21 +01:00
Maxime Coste
5ebd588e5f
remove unused memoryview<char> String::data
2014-04-21 00:26:20 +01:00
Maxime Coste
61619d82bf
use StringView::zstr() in place of StringView::str().c_str()
2014-04-21 00:26:20 +01:00
Maxime Coste
7cdb94d5c7
Use StringView in shell manager
2014-04-21 00:26:20 +01:00
Maxime Coste
63a0b9d22a
Add a zstr() method to StringView that returns a zero terminated string holder
2014-04-21 00:26:20 +01:00
Maxime Coste
c4295b7e30
Fix StringView::substr when passed a negative length
2014-04-20 12:03:57 +01:00
Maxime Coste
055eacd032
use StringView for parse_keys
2014-04-20 11:27:59 +01:00
Maxime Coste
b2123547df
Use StringView in BufferManager
2014-04-19 09:53:37 +01:00
Maxime Coste
97b08a6f09
Use StringView for file functions
2014-04-18 14:03:08 +01:00
Maxime Coste
adde2fef75
Use StringView for completion functions
2014-04-18 14:02:14 +01:00
Maxime Coste
af2d82dfc1
Add StringView class for non owning string
2014-04-18 13:47:39 +01:00
Maxime Coste
a7e6e5b936
Remove unimplemented String::replace method
2014-04-18 13:19:07 +01:00
Maxime Coste
1d7a481e81
word completion ignore the word on which the cursor is present
2014-04-17 19:33:49 +01:00
Maxime Coste
2b997719c3
Rename BufferCompleter to InputCompleter
2014-04-16 19:08:44 +01:00
Maxime Coste
7af9863e51
Add an explicit refresh method to user interface
...
With this refresh method user interface can defer updating
the display until really needed.
2014-04-15 19:19:44 +01:00
Maxime Coste
98c6a6f17e
RemoteClient process all available messages
2014-04-15 19:09:42 +01:00
Maxime Coste
374f97a592
fix exception being thrown in error in decl command
2014-04-14 19:01:00 +01:00
Maxime Coste
386813bbfd
Add a 'prompt' command
2014-04-13 14:15:34 +01:00
Maxime Coste
7097fcf640
Allow unset completer function in Prompt input mode
2014-04-13 14:15:05 +01:00
Maxime Coste
9ff356cb2b
Extract option descriptions in an shared OptionDesc class
2014-04-12 20:03:26 +01:00
Maxime Coste
e9276a0a85
Add a docstring to options
2014-04-11 18:43:25 +01:00
Maxime Coste
05d69f7f8e
Use stat when listing files so that link to directories are handled as directories
2014-04-11 18:43:25 +01:00
Jimmy Thrasher
061264c039
Define extern char **environ for OSX, which doesn't define it in a header
2014-04-10 15:23:39 -04:00
Maxime Coste
30bdc8936b
Fix select_whole_lines on empty buffer
2014-04-10 20:14:11 +01:00
Maxime Coste
19868f01c8
return a const String& in Option::name()
2014-04-09 19:33:37 +01:00