Maxime Coste
489621cf58
update c++ highlighter
2012-11-12 20:07:47 +01:00
Maxime Coste
6ebe41b1a5
BufferIterator holds a safe_ptr to their buffer instead of a raw pointer
2012-11-12 20:07:33 +01:00
Maxime Coste
037210c70c
SafeCountable::m_count is mutable so that we can have safe_ptr<const T>
2012-11-12 20:07:05 +01:00
Maxime Coste
801f4e740c
Add jump list support to context
...
jump forward is bound to ctrl-i
jump backward is bound to ctrl-o
switch buffers or jumping somewhere in the buffer push the current
position to the jump list.
when a buffer is deleted, all entries referencing it in jump lists
are erased.
2012-11-12 19:59:25 +01:00
Maxime Coste
41b5336296
make ctags.kak tag implementation more robust
2012-11-12 19:42:26 +01:00
Maxime Coste
3f403474ac
update asciidoc highlighting
2012-11-12 19:41:39 +01:00
Maxime Coste
39932f7ea2
Fix IncrementalInserter::insert(memoryview<String>) so that inserting registers works as intended
2012-11-12 13:40:07 +01:00
Maxime Coste
2781056ce6
Add a rc/ctags.kak for a :tag implementation using exuberant ctags
2012-11-09 19:10:08 +01:00
Maxime Coste
0887e1364e
InputHandler: Handle C-c as Escape
2012-11-08 14:05:00 +01:00
Maxime Coste
68cc07022c
NCurses: catch SIGINT and send a C-c instead
2012-11-08 14:04:41 +01:00
Maxime Coste
0e5f548f76
minor tweaks in displayed texts
2012-11-08 13:38:02 +01:00
Maxime Coste
3a34fae9a7
Editor: avoid end of lines when moving selection
2012-11-08 13:37:29 +01:00
Maxime Coste
bdd0758ee2
Saner :edit and :buffer behaviour when buffer is the current one
2012-11-07 14:04:47 +01:00
Maxime Coste
0f7948848e
Fix buffer deletion from a client when another is editing it
2012-11-07 14:02:23 +01:00
Maxime Coste
d6923af3c4
server socket filename available through $kak_socket env var
2012-11-06 14:25:25 +01:00
Maxime Coste
3471d795c9
ClientManager: tweak on input event lambda
2012-11-06 13:37:18 +01:00
Maxime Coste
d347223e42
EventManager: store event handlers in an unordered_map instead of a vector
...
If an event handler add or removes an event from the manager, it may then
be moved in the vector, and if after that it access any of it's members
(through this), it results in an invalid memory access.
2012-11-06 13:34:58 +01:00
Maxime Coste
3daac4883e
Move client drawing responsiblity to the ClientManager
2012-11-05 19:58:04 +01:00
Maxime Coste
a41bb34b21
Window: maintain the timestamp of last display buffer update
2012-11-05 19:54:09 +01:00
Maxime Coste
fedabb4176
Rework Window creation, avoid using the same window in multiple clients
2012-11-05 19:15:42 +01:00
Maxime Coste
42315c4b5c
Editor: store a safe_ptr to buffer instead of reference
2012-11-04 23:39:25 +01:00
Maxime Coste
ea17525b2a
Window: sanitize position in set_position
2012-10-31 14:28:47 +01:00
Maxime Coste
c947819154
Fix buffer iterator_at_line_{begin,end}(LineCount)
2012-10-31 14:28:03 +01:00
Maxime Coste
74731b0d0f
refactor Client creation
2012-10-31 14:23:44 +01:00
Maxime Coste
6eef68124f
use custom Client::operator=(Client&&) to drop safe counts first
2012-10-30 18:13:57 +01:00
Maxime Coste
1ea4b3998a
Add a ClientManager for managing client lifetimes
2012-10-30 14:00:44 +01:00
Maxime Coste
bc7dfec44c
tweak cpp highlighting
2012-10-29 19:17:48 +01:00
Maxime Coste
945f54daea
fix crashes when cycling through menu with an active filter
2012-10-29 19:17:37 +01:00
Maxime Coste
254d43856d
NCurses: refactor status line handling, and disambiguate status line from mode line
2012-10-29 19:01:57 +01:00
Maxime Coste
6f2c69a0eb
fix adapt_for_linewise for Replace mode
2012-10-29 19:00:28 +01:00
Maxime Coste
cc876f7107
validate key in InputHandler before sending to mode, and minor refactor
2012-10-29 18:59:41 +01:00
Maxime Coste
6b664052b8
Use a Server object instead of just calling setup_server
2012-10-29 13:44:53 +01:00
Maxime Coste
ba244a70a3
NCurses: fix long lines handling
2012-10-28 11:00:23 +01:00
Maxime Coste
d9729cc29e
Handle all available input before redrawing
2012-10-28 09:26:54 +01:00
Maxime Coste
13a081ed4a
Remote: fix resize handling
2012-10-27 15:49:10 +02:00
Maxime Coste
b24a80a3ec
NCurses::draw: maintain current column without using ncurses
2012-10-27 15:48:08 +02:00
Maxime Coste
031ed91ea6
EventManager: handle forced events even when poll return -1
2012-10-27 15:15:34 +02:00
Maxime Coste
b199cfd644
NCursesUI: force input handling reexecution when resizing
2012-10-27 15:02:17 +02:00
Maxime Coste
70cdb7a811
EventManager: add force_signal method to force event execution
2012-10-27 15:01:13 +02:00
Maxime Coste
24b43f91c8
NCurses: rework terminal resize handling
2012-10-27 14:18:52 +02:00
Maxime Coste
ee882d9d02
utf8: use CharCount instead of size_t
2012-10-27 13:26:40 +02:00
Maxime Coste
61c8ef6ce4
remote: send resize message when needed
2012-10-26 16:14:51 +02:00
Maxime Coste
73aa11ac16
remote: check read/write results, detect disconnections
2012-10-26 13:45:32 +02:00
Maxime Coste
1c3f6c314f
send actual dimensions of remote client at connection
2012-10-25 12:51:01 +02:00
Maxime Coste
0735c69a92
add initial (and buggy) unix socket based client/server code
2012-10-24 21:44:19 +02:00
Maxime Coste
b9eb939e05
Add some remote client support protocol code
2012-10-23 22:55:44 +02:00
Maxime Coste
b163711963
DisplayBuffer: store lines in a vector, not a list
2012-10-23 22:55:04 +02:00
Maxime Coste
227c66cf61
use Colors and Attributes are char
2012-10-23 22:53:56 +02:00
Maxime Coste
98b6618658
merge contiguous DisplayAtoms after highlighting DisplayBuffer
2012-10-22 13:20:02 +02:00
Maxime Coste
eed8a2a57c
add basic utf8 unit test
2012-10-22 01:05:56 +02:00
Maxime Coste
49237a771b
some minor cleanups/refactorings in main
2012-10-21 13:09:01 +02:00
Maxime Coste
a0cca31dc1
make UserInterface unaware of Window, only of DisplayBuffer
2012-10-20 20:15:20 +02:00
Maxime Coste
48fe18ff0a
memoryview: include cstddef for size_t
2012-10-20 16:40:12 +02:00
Maxime Coste
28c8acf80a
assert: throw if launching xmessage fails
2012-10-19 03:53:10 +02:00
Maxime Coste
abf514f305
avoid utf8 errors with invalid keys, like ncurse KEY_RESIZE
2012-10-18 19:56:57 +02:00
Maxime Coste
132c31042e
main: prepare for multi client support
2012-10-17 17:49:34 +02:00
Maxime Coste
df400f90ab
utf8: replace InvalidBytePolicy::Throw with InvalidBytePolicy::Assert
2012-10-17 17:01:51 +02:00
Maxime Coste
c1387dc592
assert: simplify header
2012-10-17 17:01:08 +02:00
Maxime Coste
4aa3a36102
rename Client to InputHandler
2012-10-17 13:14:03 +02:00
Maxime Coste
1ab486b0d8
verious refactoring
2012-10-16 18:42:51 +02:00
Maxime Coste
f8abbfbb44
assert: use xmessage to block on assert failed
2012-10-16 16:16:32 +02:00
Maxime Coste
214baf4cdd
add a _str user defined literal to create String
2012-10-16 15:11:22 +02:00
Maxime Coste
6ff6058ceb
create_buffer_from file return nullptr on file not found instead of throwing
2012-10-16 14:59:39 +02:00
Maxime Coste
4be6882bd5
Menu: support searching through choices with /
...
when hitting / while in a menu, a regex filter can be entered so that only
entries matching it are selectable, <esc> disable filtering while a second
<esc> close the menu as usual.
2012-10-15 12:49:46 +02:00
Maxime Coste
148466c659
Extract basic line editing functionality from PromptMode to LineEditor
2012-10-14 16:24:35 +02:00
Maxime Coste
dfafcdb6e6
utf8::codepoint: configurable invalid byte policy
2012-10-13 19:05:14 +02:00
Maxime Coste
4f1ab5b749
fix Window::scroll_to_keep_cursor_visible_ifn
2012-10-11 14:23:20 +02:00
Maxime Coste
4210a17753
Client: never call substr(CharCount, String::npos);
2012-10-11 14:22:08 +02:00
Maxime Coste
c92077762c
Makefile: add -Wall to CXXFLAGS
2012-10-11 01:17:29 +02:00
Maxime Coste
0ce6bd9bf5
use ByteCount instead of CharCount when we are really counting bytes
...
(that is most of the time when we are not concerned with displaying)
2012-10-11 00:41:48 +02:00
Maxime Coste
571861bc7b
Return something in utf8::distance, thanks again gcc for letting this work
2012-10-11 00:39:17 +02:00
Maxime Coste
561cc72d6c
Add a ByteCount unit
2012-10-11 00:13:31 +02:00
Maxime Coste
2cdebe01d3
fix make tags
2012-10-10 22:44:06 +02:00
Maxime Coste
8de754e2e9
when executing keys, propagate potentially changed editor to calling context
2012-10-10 19:15:43 +02:00
Maxime Coste
dae8f65308
exec concat all its arguments instead of accepting only one
2012-10-10 19:15:09 +02:00
Maxime Coste
ffba94fcde
Actually return something in utf8::codepoint, thanks gcc for using rax
2012-10-10 19:14:18 +02:00
Maxime Coste
a04d1e3a1f
Editor merge selections when they overlap
2012-10-10 19:11:24 +02:00
Maxime Coste
5bb37ad755
Support Append mode for Editor::select and use it for 'N' key
2012-10-10 13:59:55 +02:00
Maxime Coste
4c8b4890e6
Context: explicit constructors and more comments
2012-10-10 13:59:55 +02:00
Maxime Coste
74cdeb5952
Paste use a linewise mode when pasted string ends with a \n
2012-10-10 13:59:55 +02:00
Maxime Coste
b48d639976
Editor::insert handle all InsertModes
2012-10-10 13:59:55 +02:00
Maxime Coste
d574ae864d
Editor::insert takes an InsertMode param, remove Editor::{append,replace}
2012-10-09 19:25:20 +02:00
Maxime Coste
7a8366da2b
add a unicode.hh header for Codepoint related functions, s/utf8::Codepoint/Codepoint/
2012-10-09 19:15:05 +02:00
Maxime Coste
e1d4215159
InsertMode insert the whole utf8 representation of a codepoint
2012-10-09 14:31:00 +02:00
Maxime Coste
c0db3b81be
NCursesUI::get_key returns the codepoint
2012-10-09 14:30:35 +02:00
Maxime Coste
ba50d853b3
Editor: fix move_selection(LineCount) for utf8
2012-10-09 14:29:59 +02:00
Maxime Coste
1af7465107
utf8: add dump(OutputIterator& it, Codepoint cp)
2012-10-09 14:29:37 +02:00
Maxime Coste
c7272e427d
get rid of Character
2012-10-08 19:33:53 +02:00
Maxime Coste
194bf6ac98
Buffer: add some utf8 sanity checks
2012-10-08 19:25:17 +02:00
Maxime Coste
bff015d5b9
WordCompleter: avoid word currently being edited
2012-10-08 19:14:48 +02:00
Maxime Coste
0a686573ab
utf8 awareness in selectors
2012-10-08 19:12:09 +02:00
Maxime Coste
ed592a3005
DisplayAtom: add utf8 sanity check
2012-10-08 14:28:54 +02:00
Maxime Coste
5602bc10e8
DisplayAtom: only let DisplayLine touch m_begin and m_end
2012-10-08 14:28:38 +02:00
Maxime Coste
7e046e3f0b
utf8 awareness in editor, highlighters and ncurses
2012-10-08 14:27:43 +02:00
Maxime Coste
5a267ab627
selections should always point to an utf8 character sequence start byte
2012-10-08 14:26:57 +02:00
Maxime Coste
f2e98f700e
add utf8_iterator for adapting byte iterators to iterate on unicode characters
2012-10-08 14:25:58 +02:00
Maxime Coste
2db1d02329
add utf8 helpers in utf8.hh
2012-10-08 14:25:05 +02:00
Maxime Coste
946b4650b6
fix postfix StronglyTypedInteger::operator{++,--}
2012-10-02 14:19:45 +02:00
Maxime Coste
514aeead63
do not use our broken safe bool, c++11 explicit bool conversion is better
2012-10-02 14:18:34 +02:00
Maxime Coste
9ae8f5e47b
Editor::move_selection now either takes a LineCount or a CharCount
2012-10-02 14:10:00 +02:00
Maxime Coste
669d2e456f
add postfix operator++ to BufferIterator
2012-10-02 14:09:06 +02:00
Maxime Coste
9ec10daf69
move clamp to utils.hh
2012-10-02 14:08:09 +02:00
Maxime Coste
84acf2594a
grep,make: tweak mktemp call to work on OSX
2012-10-02 10:37:08 +02:00
Maxime Coste
081f579ba1
OSX compilation fixes
2012-10-02 10:36:28 +02:00
Maxime Coste
4b0ccb0437
String and BufferIterator value_type goes back to plain char
2012-10-01 20:20:08 +02:00
Maxime Coste
f2f3421637
cpp.kak: fix string highlighter
2012-10-01 14:24:32 +02:00
Maxime Coste
bd0805cf3e
autoenable word completion while inserting
2012-10-01 14:23:04 +02:00
Maxime Coste
29b72b3e24
Add a word completing functionality to insert mode (wip)
2012-09-30 16:24:06 +02:00
Maxime Coste
430765e132
extract is_alpha to string.hh
2012-09-30 16:23:18 +02:00
Maxime Coste
801e3eaae2
Add a Window::display_position(const BufferIterator&) method
2012-09-30 16:22:03 +02:00
Maxime Coste
6cd5d80757
Add a length method to AtomContent
2012-09-30 16:21:20 +02:00
Maxime Coste
5b6cb500fc
Menus can be placed anywhere on the screen, and takes a style parameter
...
This paves the way for insert mode completion menu using the current
prompt menu system.
2012-09-30 15:18:37 +02:00
Maxime Coste
f230feec7f
Change buffer order based on the last one used
2012-09-28 14:14:49 +02:00
Maxime Coste
79d8d082bd
Store capture groups with selections in editor, and access them through dynamic registers
2012-09-26 20:43:42 +02:00
Maxime Coste
a8d2482eb6
Editor now stores selections as SelectionAndCapturesList
2012-09-26 20:33:47 +02:00
Maxime Coste
a2fd1528e6
Move last insertion from Client to Context
2012-09-26 20:07:06 +02:00
Maxime Coste
77eb86bcdb
Forbid context copy
2012-09-26 14:27:23 +02:00
Maxime Coste
efc069b531
Extract IncrementalInserter::Mode as InsertMode
...
move ClientMode classes in a namespace due to InsertMode name collisions
2012-09-26 14:22:24 +02:00
Maxime Coste
f76323f56e
Move UserInterface out of Client into Context
2012-09-26 14:13:04 +02:00
Maxime Coste
c36ee924eb
cleanup BatchUI
2012-09-25 14:23:50 +02:00
Maxime Coste
730f39aaa0
remove selection stack from editor
2012-09-24 20:47:06 +02:00
Maxime Coste
747c14c19f
Hide more Client Mode code in the cpp
2012-09-24 19:39:40 +02:00
Maxime Coste
a312ce6dc2
extract Client virtual methods to a UserInterface class
2012-09-24 19:24:27 +02:00
Maxime Coste
0380c999c3
move Client::Mode class definition in client.cc
2012-09-24 14:03:04 +02:00
Maxime Coste
b3c4912404
Use context.editor() instead of context.window() when a window is not needed
2012-09-24 13:56:39 +02:00
Maxime Coste
e86e3bda4d
select_all_matches: reject match that start at the end of originating selection
2012-09-19 14:04:09 +02:00
Maxime Coste
81eae79154
ncurses: fix displaying of lines longer than screen
2012-09-17 21:38:51 +02:00
Maxime Coste
b245b39a85
RegexColorizer: store ColorPairs by pointer so that alias changes are taken into account
2012-09-17 21:02:08 +02:00
Maxime Coste
a92a6dc7f3
ColorRegistry: permit overriding an alias
2012-09-17 21:01:11 +02:00
Maxime Coste
4d369d6290
kakrc: use color aliases for cpp and kakrc highlighting
2012-09-17 19:02:08 +02:00
Maxime Coste
5cf947f845
Add a ColorRegistry class responsible of color parsing and supporting aliases
...
colalias command permits to define names for color pairs
2012-09-17 19:01:13 +02:00
Maxime Coste
45bffd8b8a
fix parse_keys for <esc>
2012-09-17 13:46:34 +02:00
Maxime Coste
00e357ed56
PromptMode: fix completion of non-last parameters
2012-09-17 13:37:08 +02:00
Maxime Coste
ebae75e96e
fifo: buffer size is 4k instead of 512
2012-09-14 14:29:54 +02:00
Maxime Coste
f6d2533cae
rework fifo handling, use real fifos in {make,grep}.kak, update README
2012-09-12 19:54:46 +02:00
Maxime Coste
a467d73115
use parse_filename when opening files or completing filenames so that ~ and env vars are handled
2012-09-12 19:42:12 +02:00
Maxime Coste
6f6f10c83d
simplify tab completion code in Client::InsertMode
2012-09-12 19:09:27 +02:00
Maxime Coste
ec57990060
whine when a search selected nothing so that the user knows
2012-09-12 19:09:10 +02:00
Maxime Coste
cfbe32f6a2
support Tab/BackTab keys in MenuMode as well
2012-09-12 14:25:14 +02:00
Maxime Coste
7266052d46
grep command uses file completion
2012-09-12 14:22:01 +02:00
Maxime Coste
7c039585a4
add -file-completion option to def command and document in README
2012-09-12 14:21:42 +02:00
Maxime Coste
62e50c38fa
commands.cc: cleanup
2012-09-11 19:09:55 +02:00
Maxime Coste
9dfccddca8
Correctly handle arrow keys in insert mode
2012-09-11 19:09:14 +02:00
Maxime Coste
e39086cd5f
Buffer: reset undo data after executing hooks in constructor
2012-09-11 19:03:37 +02:00
Maxime Coste
a0b75817a5
do not keep undo data in the debug buffer
2012-09-11 19:03:13 +02:00
Maxime Coste
eac68f09a4
NCursesClient::show_menu: stop displaying counts in front of items
2012-09-11 14:30:32 +02:00
Maxime Coste
859e907396
fix NCursesClient::menu_select for one past last item
2012-09-11 14:28:54 +02:00
Maxime Coste
ee4c6b04a6
Support Shift-Tab in prompt mode to go back in completions
2012-09-11 14:27:21 +02:00
Maxime Coste
b5a2901f8d
add 'r' for replacing selection with next typed char
2012-09-11 14:01:41 +02:00
Maxime Coste
f8a6045307
Load config file in ${XDG_CONFIG_HOME}/kak/kakrc and ${XDG_CONFIG_HOME}/kak/autload/*
...
Do not autoload files in $kak_runtime/rc, let the user choose
restore the runtime command implemented in shell this time.
2012-09-10 20:45:34 +02:00