Maxime Coste
9dbc6adcda
add a SIGSEGV handler
2013-01-23 13:46:18 +01:00
Maxime Coste
2f9e061252
assert: add some debug info in the message
2013-01-23 13:45:44 +01:00
Maxime Coste
4497767492
NCursesUI::get_key(): move getch_iterator as a local type
2013-01-22 14:29:16 +01:00
Maxime Coste
0c8832c42a
LineAndColumn::operator+= is not constexpr
2013-01-22 14:28:43 +01:00
Maxime Coste
1b53b92267
Buffer: check that newlines are at the end of lines
2013-01-22 14:28:15 +01:00
Maxime Coste
f7038980a0
Add kak_cursor_{line,column} env var
2013-01-21 13:58:54 +01:00
Maxime Coste
9002059c0d
Window: fix display position, count utf8 characters for column
2013-01-17 19:49:49 +01:00
Maxime Coste
f1b6108367
NCurses: use default background for '~'
2013-01-17 19:49:48 +01:00
Maxime Coste
9c2bbe218b
replace char: fix unicode handling
2013-01-17 19:49:48 +01:00
Maxime Coste
44ca4d23de
Fix sort_and_merge_overlapping
2013-01-17 19:49:48 +01:00
Maxime Coste
3f01f4bdf5
Add some documentation to InputHandler
2013-01-17 14:27:32 +01:00
Maxime Coste
d1f15123e4
InputHandler: minor code cleanup
2013-01-17 14:22:24 +01:00
Maxime Coste
edb5dbc56f
move {exec,eval}_string common code to a helper context_wrap function
2013-01-17 14:06:06 +01:00
Maxime Coste
c45838cc57
Move Insertion Hooks handing to the input handler
2013-01-17 13:58:57 +01:00
Maxime Coste
cedb0d18a3
exec and eval accepts a restore-selection parameter
2013-01-17 13:58:09 +01:00
Maxime Coste
621be2ceab
Hooks now takes a non-const context
2013-01-17 13:45:43 +01:00
Maxime Coste
bdc47ddef8
NCursesUI: redraw becomes a member
2013-01-15 14:16:45 +01:00
Maxime Coste
93cad94330
InputHandler: Insert mode calls 'InsertIdle' hook when idle
2013-01-15 14:15:12 +01:00
Maxime Coste
12ce590f18
Context: add a hooks method similar to the options one
2013-01-14 19:26:44 +01:00
Maxime Coste
a1998dac7a
InputHandler: use a timer for word completion instead of calling it at each insertion
2013-01-14 19:17:37 +01:00
Maxime Coste
90eeb7b8a7
EventManager: add support for timers
2013-01-14 19:07:38 +01:00
Maxime Coste
eaaf88db1d
rename StronglyTypedInteger to more accurate StronglyTypedNumber
2013-01-14 18:51:45 +01:00
Maxime Coste
3d00f398fe
NCurses: redraw after menu/info window is modified
2013-01-14 18:51:07 +01:00
Maxime Coste
310ec1f791
move input watching responsibility into UserInterface implementations
2013-01-14 18:50:17 +01:00
Maxime Coste
d2f0e2de66
RemoteClient owns the FDWatcher of it's socket
2013-01-11 18:44:02 +01:00
Maxime Coste
914ede7a82
Add and use a Set template class for recuring small sets
2013-01-11 14:28:13 +01:00
Maxime Coste
79d28e68dc
Refactor EventManager
...
Watching a file descriptor is now done using a FDWatcher object
2013-01-10 19:10:42 +01:00
Maxime Coste
bba7152063
Add backward search support (bound to alt-/)
2013-01-08 18:46:45 +01:00
Maxime Coste
f77509d498
add sh.kak for shell script highlighting
2013-01-08 14:01:22 +01:00
Maxime Coste
59941bcfa9
Make: fix userconfig target
2013-01-08 14:00:13 +01:00
Maxime Coste
3f7bf82cde
Support for selecting to surrounding object begin/end with [ and ]
2013-01-07 18:53:27 +01:00
Maxime Coste
8d4678a82e
Autoname client on creation, and access client name from shell with $kak_client
2013-01-07 13:59:09 +01:00
Maxime Coste
7acd4e3e6a
minor code cleanup
2013-01-06 21:58:02 +01:00
Maxime Coste
9efc32596b
make: use a makecmd option
2013-01-06 19:21:42 +01:00
Maxime Coste
f3640a2d03
alt-r rotates selections
2013-01-05 18:26:57 +01:00
Maxime Coste
4b649d386c
various code style fixes
2013-01-04 18:39:13 +01:00
Maxime Coste
5939eb219f
add client.kak providing 'new' command for opening a new client
...
Autodetect tmux, use tmux if we are in a tmux session, else fallback to
urxvt.
2013-01-04 18:31:37 +01:00
Maxime Coste
03d32c2e2d
tweak kakrc highlighting
2013-01-03 18:53:04 +01:00
Maxime Coste
08fd946c07
Add a nop command to avoid accidental shell output evaluation
2013-01-03 18:52:07 +01:00
Maxime Coste
f84e46f805
tweak errjump command
2013-01-03 18:47:51 +01:00
Maxime Coste
ae9aadb07d
Fix captures preservation in Editor
2013-01-03 18:47:02 +01:00
Maxime Coste
2195d59b49
refactoring selectors
2013-01-03 14:30:14 +01:00
Maxime Coste
4f6507b808
Highlight last selection differently
2013-01-03 14:01:34 +01:00
Maxime Coste
0045456f87
alt-n replace last selection with next match
2013-01-03 14:00:59 +01:00
Maxime Coste
02b9fcc3df
Editor: add a ReplaceLast select mode
2013-01-03 14:00:31 +01:00
Maxime Coste
9fb0129061
Editor: keep last selection as last when sorting
...
sort selections 'circularly', keeping the last one
at the end of the list.
2013-01-03 13:59:53 +01:00
Maxime Coste
a9d5f126a0
Editor: preserve captures accross movements
2013-01-02 13:49:02 +01:00
Maxime Coste
476363bf0d
Editor: cleanup check_invariants calls
2012-12-31 18:36:28 +01:00
Maxime Coste
074a21463b
add a current search highlighter
2012-12-31 14:37:11 +01:00
Maxime Coste
d5582b0df4
add incsearch option to choose if incremental search is enabled
2012-12-31 14:12:00 +01:00
Maxime Coste
76c3246642
Add Editor::select(const Selection&, SelectMode)
2012-12-31 14:06:20 +01:00
Maxime Coste
4e69ec078d
minor cleanup
2012-12-31 13:57:21 +01:00
Maxime Coste
18b35a3ab3
Editor: merge_overlapping -> sort_and_merge_overlapping
2012-12-31 13:56:52 +01:00
Maxime Coste
dc9635a247
Fix join on last line (it appended a trailing space)
2012-12-31 13:44:01 +01:00
Maxime Coste
fe363094cf
support count in search next, and only push jump in replace mode
2012-12-31 13:42:59 +01:00
Maxime Coste
2b2474b2d1
add a force mode to delete buffer (db!)
2012-12-28 14:07:35 +01:00
Maxime Coste
cb80ae139b
IncrementalInserter: fix append mode when on line end
2012-12-28 14:06:56 +01:00
Maxime Coste
28cf772deb
tweak window status line format
2012-12-28 13:53:00 +01:00
Maxime Coste
9531fd5915
Buffer loses the 'New' flag when written
2012-12-28 13:52:19 +01:00
Maxime Coste
d4f155cae7
new clients always takes last used buffer, support multiple file on command line
2012-12-28 13:51:14 +01:00
Maxime Coste
8f5be9bf91
BufferManager: registering buffers are front inserted
2012-12-28 13:50:02 +01:00
Maxime Coste
030df1c4be
IncrementalInserter: preserve captures
2012-12-27 19:11:42 +01:00
Maxime Coste
8bfb7da674
fix splitting with inverted selection
2012-12-27 18:56:06 +01:00
Maxime Coste
41979c91f4
Editor: when replacing, select inserted text
2012-12-27 18:54:52 +01:00
Maxime Coste
ac778c8aa2
select_matching: fix when matching is the first character
2012-12-27 13:41:45 +01:00
Maxime Coste
f3a7c76c4e
add a -n option prevent kakrc from being sourced
2012-12-19 18:57:10 +01:00
Maxime Coste
2ab9b474be
Client: catch errors when executing init commands
2012-12-19 18:56:47 +01:00
Maxime Coste
6c901e9152
Buffer: close undo group when saved
2012-12-19 18:56:20 +01:00
Maxime Coste
63d30a30d5
support -e switch for initial command to execute
2012-12-18 21:41:13 +01:00
Maxime Coste
26632726ad
Support initial command passing when a client is connecting
2012-12-18 21:20:36 +01:00
Maxime Coste
9ca69820ac
do_go: support append mode on go to top/bottom, ignore case
2012-12-18 19:12:24 +01:00
Maxime Coste
6cc4ec796e
editor: support select mode on select(BufferIterator)
2012-12-18 19:12:15 +01:00
Maxime Coste
cf7e6bdd07
join: preserve multiple selections
2012-12-18 19:00:55 +01:00
Maxime Coste
43ad920bd8
menu commands has a -select-cmds option
...
when this option is given, menu expect three argument per entry
instead of two, the last one being the command to run when the
entry is selected, but not yet validated.
2012-12-15 19:11:22 +01:00
Maxime Coste
df14427210
NCurses: info window tries to avoid the menu one
2012-12-15 19:11:04 +01:00
Maxime Coste
fd09e8a2de
NCurses: some code refactoring
2012-12-15 18:32:56 +01:00
Maxime Coste
b090465e80
Command line parsing: support empty strings
2012-12-15 17:47:50 +01:00
Maxime Coste
d208067589
InputHandler: call callback on abort and on selected element change as well
2012-12-14 19:38:11 +01:00
Maxime Coste
3184159572
info: support a -inline option
...
By default display info box above command line, full width
(like menu), in inline mode, display the info box close
to cursor, using only needed width.
2012-12-14 19:25:27 +01:00
Maxime Coste
9236c87842
UserInterface: add info box support
...
using the info command, you can display an arbitrary string
in a tooltip box.
2012-12-14 19:04:34 +01:00
Maxime Coste
8e170e4385
optimize merge_overlappings
...
assume selections are sorted, so we have a linear complexity algorithm
instead of O(n²).
2012-12-13 18:50:27 +01:00
Maxime Coste
3aee1c37fb
perf tweak in BufferIterator
2012-12-13 18:50:27 +01:00
Maxime Coste
bf07d2576e
minor refactoring in highlight_range
2012-12-13 18:50:27 +01:00
Maxime Coste
31d2cfa9a1
ctags.kak: avoid brackets in search pattern
2012-12-13 18:50:27 +01:00
Maxime Coste
1c94064713
DynamicSelectionList: derive from SelectionList
...
the previous implementation did not preserve invariant
either, so we'd better use less code.
2012-12-13 18:50:27 +01:00
Maxime Coste
57ad454b53
tweak cpp highlighting
2012-12-13 18:50:27 +01:00
Maxime Coste
c74b44f540
change replace char behaviour, now replace each selected chars
2012-12-13 18:50:27 +01:00
Maxime Coste
777a79d37c
File completion: when no files match entered text as prefix, try as regex
2012-12-13 18:50:27 +01:00
Maxime Coste
cfd7ee049a
move selection updating code out of selection, to DynamicSelectionList
...
this avoids a lot of unnecessary (add|remove)_change_listener as
creating temporary Selections do not call that anymore.
Use can choose between a SelectionList which or a DynamicSelectionList
depending on wethear the buffer will be modified or not during the
selections lifetime.
2012-12-13 18:50:27 +01:00
Maxime Coste
e36bc74f43
do_select: do not propagate errors on incremental search
2012-12-13 18:50:27 +01:00
Maxime Coste
892b65b355
overlaps takes Range parameters instead of Selection
2012-12-13 18:49:29 +01:00
Maxime Coste
48c9d89585
tweak git commit message highlighting
2012-12-13 18:49:29 +01:00
Maxime Coste
969a1213c4
Makefile: add a userconfig target
...
make userconfig takes care of creating $XDG_CONFIG_HOME/kak/autoload
and populate it with links to files in the rc directory
2012-12-13 18:49:29 +01:00
Maxime Coste
92c4a9abce
Prompt: when completion has only one candidate, next tab starts a new completion
2012-12-13 18:49:29 +01:00
Maxime Coste
bc1a90d4f5
file completion: disable ignored files when entered prefix matches.
2012-12-13 18:49:29 +01:00
Maxime Coste
b63c658da5
remote.cc: move write function as member of Message
2012-12-13 18:49:29 +01:00
Maxime Coste
db3a953961
code cleanup in remote.cc
2012-12-13 18:49:29 +01:00
Maxime Coste
9230ccc087
the shell used for command execution can be changed using the 'shell' option
2012-12-13 18:49:29 +01:00
Maxime Coste
33f87db553
minor code cleanup in do_select_object
2012-12-13 13:25:39 +01:00
Maxime Coste
8223679247
select/split: check expression is not empty
2012-12-13 13:25:21 +01:00
Maxime Coste
7cc66ee64d
push current selection on search
2012-12-13 13:24:38 +01:00
Maxime Coste
d0c800a7d7
Support nested {Filters,Highlighter}Group
2012-12-09 18:58:58 +01:00
Maxime Coste
7d6a48f43a
ncurses.cc: handle ascii del as backspace
2012-12-09 14:31:19 +01:00
Maxime Coste
afc8ad77e8
InputHandler: tweak prefix completion behaviour
2012-12-07 19:20:26 +01:00
Maxime Coste
158f5a5c84
extract ParametersParser to it's own file
2012-12-07 19:20:26 +01:00
Maxime Coste
d25bafa95d
grep.kak: configurable grep command, search selection when no params
2012-12-07 19:20:26 +01:00
Maxime Coste
c000ca2220
source user kakrc after autoloads, so that user can override options
2012-12-07 19:19:45 +01:00
Maxime Coste
ff1f9f662d
cleanup {make,grep}.kak
2012-12-07 19:19:45 +01:00
Maxime Coste
b81ea0bc92
PromptHandler now call callback when edited and aborted.
...
Used for a new feature: incremental search
2012-12-06 13:33:26 +01:00
Maxime Coste
3438ba7ec3
*scratch* buffer use undo
2012-12-05 19:22:07 +01:00
Maxime Coste
479bb9df2c
fail nicely when trying to open a directory
2012-12-05 13:59:08 +01:00
Maxime Coste
ce6e864772
'exec' and (resurected) 'eval' commands can take a '-client' parameter
2012-12-03 18:57:57 +01:00
Maxime Coste
cf39835805
add 'name' command to set current client name
2012-12-03 18:57:23 +01:00
Maxime Coste
4a3f9d6187
ClientManager: support naming clients and accessing client's context by name
2012-12-03 18:56:53 +01:00
Maxime Coste
e8df81a39d
RemoteClient: call get_key soon so that it may process a resize before size change checks are done
2012-12-03 18:51:28 +01:00
Maxime Coste
8724a12dc1
NCurses: do not resize directly in signal handler, malloc may not be working there
2012-12-03 18:50:44 +01:00
Maxime Coste
9e3c1c74c5
EventManager: fix forced event processing
...
previous implementation could drop some forced events.
2012-12-03 18:49:09 +01:00
Maxime Coste
b23af02ec4
fix quit modified file behaviour
2012-12-03 13:33:05 +01:00
Maxime Coste
b764a0a63e
Selection: refactoring, move CaptureList to Selection
2012-11-30 18:32:49 +01:00
Maxime Coste
956ac60d4a
add an ignored_files regex option whose matches are not used for completion
2012-11-29 20:09:37 +01:00
Maxime Coste
33482b0979
Add configurable prompt completion behaviour
...
If option 'complete_prefix' is non 0, then completion first
use completion candidates common prefix, then circle through
candidates.
2012-11-29 19:56:34 +01:00
Maxime Coste
7dc634444d
Fix InputMode::Prompt blocking behaviour when inserting register
2012-11-29 19:03:17 +01:00
Maxime Coste
a6f0d53dbf
Remote unused Context::change_ui
2012-11-29 19:03:17 +01:00
Maxime Coste
acbe45e294
local client forks in destructor so that the kak server detaches from terminal
2012-11-29 19:03:17 +01:00
Maxime Coste
16b8f19db3
use more portable fcntl method for FD_CLOEXEC bit, enable it on forgotten sockets
2012-11-29 18:55:08 +01:00
Maxime Coste
0955ef5eb0
add an empty buffer unit test
2012-11-28 20:10:49 +01:00
Maxime Coste
3a4859ecba
ncurses: avoid refering to dead NCursesUI in signal handler
2012-11-27 18:54:27 +01:00
Maxime Coste
4c1b48e314
InputHandler: InputModes no longer die directly on mode change, they survive until end of on_key
2012-11-27 18:52:43 +01:00
Maxime Coste
dc268758dd
fix cpp indent filter
2012-11-27 14:03:21 +01:00
Maxime Coste
6ca530b5cc
EventManager: refactor (again)
2012-11-27 13:57:03 +01:00
Maxime Coste
f1b15ef86b
fix buffer creation on empty file
2012-11-27 13:39:35 +01:00
Maxime Coste
557128b641
IncrementalInsert::move_cursors: use overloaded for LineCount/CharCount editor implementation
2012-11-26 19:38:07 +01:00
Maxime Coste
cad4d3c01e
fix InsertMode::OpenLineBelow behaviour in prepare_insert
2012-11-26 19:24:38 +01:00
Maxime Coste
cee0a2d128
Append on end of line now appends to current line
2012-11-26 19:23:50 +01:00
Maxime Coste
e77ca7a4be
minor code simplification
2012-11-26 18:50:34 +01:00
Maxime Coste
91d2cc38e5
EventManager: avoid erasing an event handler while it may be in use
2012-11-26 14:08:27 +01:00
Maxime Coste
52ee8b46ae
fix crlf file reading
2012-11-26 13:36:43 +01:00
Maxime Coste
84db1e2b8c
Editor: fix replacement beheviour just before end of line
2012-11-23 19:13:47 +01:00
Maxime Coste
dca05ecc73
small code tweak
2012-11-23 18:48:04 +01:00
Maxime Coste
9c99c238e8
rewrite file opening code using mmap, opening big files is much much faster
2012-11-23 18:43:10 +01:00
Maxime Coste
c32a7b9b74
Buffer takes a vector of lines as initial content
2012-11-23 18:42:07 +01:00
Maxime Coste
53be5c87d2
String: add non const front() and back() methods
2012-11-23 18:41:33 +01:00
Maxime Coste
6a7193cf63
filter: minor code cleanup
2012-11-23 18:35:05 +01:00
Maxime Coste
ecd556db59
NCurses: use Default bg color for status line
2012-11-23 13:46:39 +01:00
Maxime Coste
2523c4955b
buffer: increment timestamp on notify saved
2012-11-23 13:41:07 +01:00
Maxime Coste
d2f811a8d5
Refactor filter and highlighter registry into a common template
2012-11-23 13:40:20 +01:00
Maxime Coste
11e885e5a5
Cleanups and minor refactoring on Buffer
2012-11-22 18:54:37 +01:00
Maxime Coste
73c446e379
code style cleanup in CommandManager
2012-11-22 14:28:14 +01:00
Maxime Coste
7bcd0353cb
ClientManager: store client with a unique_ptr
2012-11-22 14:17:46 +01:00
Maxime Coste
08ad8e8a40
move Window ownership to the ClientManager instead of the Buffer
2012-11-22 14:08:55 +01:00