Commit Graph

2743 Commits

Author SHA1 Message Date
Maxime Coste
97b871d49e Tweak notify_fatal_error message box title, might not be an assert failed 2015-08-14 13:16:06 +01:00
Maxime Coste
92d3178305 Clamp m_anchor in mouse handler, nothing garantees that it is still valid
Fixes #350
2015-08-14 13:12:44 +01:00
Maxime Coste
d2b82f507f More performant escape/unescape 2015-08-13 22:04:21 +01:00
Maxime Coste
7a36a4644e Detect face being aliased to itself
Fixes #374
2015-08-12 21:49:29 +01:00
Maxime Coste
d2762e6a1a Try to fix compilation on travis 2015-08-12 19:16:52 +01:00
Maxime Coste
7086135fa6 Display auto info on register insertion/explicit insert completion 2015-08-11 20:36:07 +01:00
Maxime Coste
8d9c402f52 Handle registers insert/explicit completion with a nested on_next_key mode 2015-08-11 13:55:56 +01:00
Maxime Coste
d7744308f6 Ensure the command exist before adding an alias
Fixes #371
2015-08-11 13:37:38 +01:00
Maxime Coste
94ec1cdde7 Add an unset command to remove an option value (falling back to parent)
unset is not applicable to global scope.
2015-08-10 13:54:52 +01:00
Maxime Coste
10d8cf64cf Move option docstring obtention to OptionRegistry 2015-08-10 13:53:30 +01:00
Maxime Coste
bfb116b8b4 Move option name completion to the OptionRegistry
Option names are the same for every option manager.
2015-08-10 13:38:06 +01:00
Maxime Coste
2eced81753 clamp coordinates find_buffer_coord 2015-08-09 23:18:26 +01:00
Maxime Coste
9d50dd3886 Use a struct rather than a std::pair for InputHandler::Insertion 2015-08-08 22:46:11 +01:00
Maxime Coste
7a59a6d758 ensure a buffer is not referenced a second time, just before actually deleting it
It can happen in certain case that a buffer gets referenced after it
gets moved to the trash, for example when it gets deleted during its
construction (due to BufCreate hook for example).
2015-08-06 21:51:44 +01:00
Maxime Coste
e7b4217762 Support flags getting modified by hooks at buffer creation
Fixes #361
2015-08-04 23:02:40 +01:00
Maxime Coste
d19df5d5de Enable more invariant checking in selection lists 2015-08-03 11:23:40 +01:00
Maxime Coste
19c52c3d61 Fix command parsing bug
Fixes #347
2015-07-30 09:41:23 +01:00
Maxime Coste
3da9458b5e Merge remote-tracking branch 'lenormf/autoinfo_number' 2015-07-29 10:44:39 +01:00
Frank LENORMAND
b7e232d230 Add the 'n' flag to the autoinfo popup window 2015-07-29 10:20:11 +03:00
Maxime Coste
12e0f46e25 Use forward declaration instead of include in commands.hh 2015-07-28 20:18:18 +01:00
Maxime Coste
6b06d77490 Small formatting fix 2015-07-27 20:43:18 +01:00
Maxime Coste
1170277e91 Always inline Allocator::construct/destroy 2015-06-26 21:32:37 +01:00
Maxime Coste
1af82e2e24 Tweak regex constructor calls 2015-07-25 11:15:03 +01:00
Maxime Coste
6bed464105 Avoid appending chars one by one in some parsing functions in CommandManager 2015-07-25 08:56:27 +01:00
TSUYUSATO Kitsune
4a20882a8d CPPFLAGS should use to specify flags for C pre-processor 2015-07-25 10:20:33 +09:00
Maxime Coste
6f337b254d Fix warning 2015-07-24 13:57:44 +01:00
Maxime Coste
ea02467564 Disable notifications when disabling an option temporarly 2015-07-23 23:42:48 +01:00
Maxime Coste
58101645ab Rewrite select_lines and trim_partial_lines
Fixes #338 for real (I hope)
2015-07-23 21:03:38 +01:00
Maxime Coste
2946504a17 Improve column highlighter to cooperate better with other highlighters
Fixes #268
2015-07-23 13:58:23 +01:00
Maxime Coste
889bc98866 fix crash in trim_partial_lines
Fixes #338
2015-07-23 13:46:20 +01:00
Maxime Coste
36ffff96be Avoid copying selection before the first line 2015-07-22 23:24:20 +01:00
Maxime Coste
733e004d44 Fix potential crash 2015-07-22 18:38:44 +01:00
Maxime Coste
82145168ec Add /usr/include/ncursesw in the include dirs list 2015-07-22 18:38:01 +01:00
Maxime Coste
3019118b10 Style tweak in client.cc 2015-07-22 13:30:03 +01:00
Maxime Coste
d55297c12d Remove -rdynamic from cygwin LDFLAGS 2015-07-20 13:17:03 +01:00
Maxime Coste
10f4bb5872 Add support for FocusIn/FocusOut events from UI 2015-07-15 13:56:31 +01:00
Maxime Coste
f8e4bb09f2 Merge remote-tracking branch 'ekie/makefile_fix' 2015-07-14 22:02:51 +01:00
Maxime Coste
17e3be48a5 Transform boost/std regex_error to Kakoune::regex_error at Regex construction
Fixes #318
2015-07-14 21:06:41 +01:00
Eike Plack
441ad1511d Install color schemes 2015-07-14 19:44:03 +02:00
Maxime Coste
7d9ec52bf2 Only allow 'sane' register names
Fixes #316
2015-07-14 13:48:39 +01:00
Maxime Coste
f87dbe410f Add missing support for Codepoint in format 2015-07-14 13:47:51 +01:00
Maxime Coste
c1b9ea4d1e Formatting tweak 2015-07-13 13:57:43 +01:00
Maxime Coste
c44c8c3d1f Use different variable for pipe command in/out text 2015-07-13 13:50:36 +01:00
Maxime Coste
905af05c61 Move Context scope access helpers as inline methods 2015-07-13 13:43:52 +01:00
Maxime Coste
24de3ed822 Move selection saving/restoring to z/Z
Fixes #284
2015-07-11 11:36:23 +01:00
Maxime Coste
a15d816ea8 Use a named struct Empty in optional 2015-07-10 19:05:21 +01:00
Maxime Coste
1d1927647a Fix formatting 2015-07-09 13:53:21 +01:00
Maxime Coste
f1c286e592 Notify user when some hooks failed 2015-07-08 14:00:50 +01:00
Maxime Coste
883a14e853 Do not allow exiting insert mode while running InsertEnd hook.
Fixes #311
2015-07-08 13:53:19 +01:00
Maxime Coste
123541822b Gracefully handle exception when opening files given on command line
Fixes #310
2015-07-08 13:43:40 +01:00
Maxime Coste
f65d41a30a Fix scrolling down hiding the cursor with scrolloff == 0 2015-07-08 13:43:32 +01:00
Maxime Coste
3c4400c5fd Change scrolloff behaviour, allow displaying pas the end of buffer
Fixes #306
2015-07-07 22:36:27 +01:00
Maxime Coste
1cbaac5323 Fix window position computation that could get negative with big scroll offsets 2015-07-06 13:10:36 +01:00
Maxime Coste
72b7a8910b Print connection failed messages with a newline
Fixes #308
2015-07-05 13:39:30 +01:00
Maxime Coste
b7be43f9b9 Merge remote-tracking branch 'xificurC/master' 2015-07-03 20:59:41 +01:00
Maxime Coste
eedf7d6c68 Fix mouse coordinates in ncurses ui with status on top 2015-07-03 18:44:25 +01:00
Maxime Coste
12dd7b04ac Try to simplify argument selector, abandon pair matching checks
Recognize both , and ; as argument separator
2015-07-02 13:41:50 +01:00
Maxime Coste
2660793a31 Small refactoring in selectors.cc 2015-07-01 23:54:17 +01:00
Maxime Coste
28ebe776c0 Refactor select_arguments and slightly change behaviour for non-inner
non inner argument contains the argument, preceeding whitespaces,
and eventual ending comma, except for first arguments (that
contains the whitespaces after the comma), and last argument (that
contains the comma before it).
2015-07-01 23:47:22 +01:00
Maxime Coste
33616f4192 Merge branch 'remap-objects' of http://github.com/elegios/kakoune 2015-07-01 22:08:17 +01:00
Viktor Palmkvist
ab2007bd4e Add remapping of text object keys 2015-07-01 17:53:38 +02:00
Viktor Palmkvist
13d212f445 Added argument text object 2015-07-01 17:42:10 +02:00
Maxime Coste
ee6fc92ae2 Fix stupid bug in '*' 2015-07-01 13:33:20 +01:00
Maxime Coste
58d115ec88 Force redraw all clients after a face changed 2015-06-30 19:12:25 +01:00
xificurC
fbb216d2ed commands starting with horizontal whitespace don't go into the history 2015-06-30 16:06:49 +02:00
Maxime Coste
670d8f7d1e Use tparm instead of tiparm 2015-06-30 13:35:51 +01:00
Maxime Coste
eb4ac85fb1 Force setting of terminal hardware scroll region on resize
It seems there is a race condition with VTE based terminals when
created and resized almost immediatly (like when doing :new) where
we end up with the hardware scroll region set to the old terminal
size.
2015-06-30 09:08:44 +01:00
Maxime Coste
130b22ff74 Refactor resize handling in NCursesUI 2015-06-30 00:31:26 +01:00
Maxime Coste
3fe8446065 Use StatusLine face as default for the status line 2015-06-29 22:48:26 +01:00
Maxime Coste
05b4d95a56 Run BufReadFifo hook after reading from fifo 2015-06-28 11:06:19 +01:00
Maxime Coste
8795a56731 Merge overlapping selections before erasing
Overlapping selections on erase confuse the ForwardChangeTracker
and will confuse the user,

Fixes #298
2015-06-28 10:16:39 +01:00
Maxime Coste
bf09f464c2 Use a relative symlink for autoload 2015-06-27 16:12:04 +01:00
Maxime Coste
44d7910336 Merge branch 'master' of http://github.com/tduzan/kakoune 2015-06-27 11:02:16 +01:00
Maxime Coste
e1ba2991f5 Initial selection saving/restoring support bound to ^ and alt-^ 2015-06-27 11:02:08 +01:00
tduzan
3bd8c36b74 Removed the '-r' flag from the ln command in the install step of the Makefile. It is not a POSIX compliant option, therefore does not work on BSD or OS X. Reference GH Issue#286.
Based on my understanding of this Makefile, the '-r' flag is unnecessary and didn't do anything additional.  The pathspec for both the source and target are explicit using a variable for a portion.
Will test via Homebrew following pushing this to my fork.
2015-06-26 12:35:03 -06:00
Maxime Coste
5b554ff474 Add support for command completion on commands, use it for :new
That means commands can be completed using other commands and their
completers. Yes that does makes sense.

Closes #296
2015-06-26 13:57:23 +01:00
Maxime Coste
b579f90bae Make sure we do not put a Value in a Value 2015-06-25 19:45:42 +01:00
Maxime Coste
cf33a062df Force redraw window after adding/removing highlighters 2015-06-25 19:45:41 +01:00
Maxime Coste
d207d13b68 Avoid unneeded default constructor call in Optional 2015-06-25 13:36:45 +01:00
Maxime Coste
cc09c36fe0 Minor reorganisation in buffer.hh 2015-06-25 13:36:23 +01:00
Maxime Coste
26cfd6af9b Style tweak 2015-06-24 13:44:47 +01:00
Maxime Coste
b97b907b2a Fix include 2015-06-24 13:40:18 +01:00
Maxime Coste
fa4c486b69 Always redraw status when redrawing the main window
That is needed so that on resize the status line does not disappear
2015-06-24 13:35:46 +01:00
Maxime Coste
6870895374 Add support for hex formatting 2015-06-22 13:56:00 +01:00
Maxime Coste
7e6b02f26a Refactor slightly window redrawing 2015-06-22 13:34:22 +01:00
Maxime Coste
3834440298 Rework window redraw handling, should redraw window less often 2015-06-21 19:56:23 +01:00
Maxime Coste
7c22ff217d Improve ncurses redraw behaviour 2015-06-21 19:51:14 +01:00
Maxime Coste
2162157752 Display pid in fatal signal message 2015-06-21 19:44:43 +01:00
Maxime Coste
75dd74ff43 Use <a-R> as replace paste all yanked selections
Move rotate to ' and rotate contents to <a-'>
Fix segfault when pasting all and nothing was yanked yet
2015-06-21 19:36:13 +01:00
Maxime Coste
64cbdcd328 Merge remote-tracking branch 'ekie/fix_edit' 2015-06-20 15:04:39 +01:00
Maxime Coste
7fd7098265 Add a combine_hash helper function 2015-06-20 15:04:31 +01:00
Maxime Coste
6d23bb056a Fix wrong exception type in str_to_int 2015-06-19 18:29:58 +01:00
Eike Plack
1bdc98abd3 Fix Self Documentation 2015-06-19 17:10:16 +02:00
Maxime Coste
fce2a21690 Fix segfault on g. when last modification position past buffer end 2015-06-18 19:51:04 +01:00
Maxime Coste
bf46870ff2 Move status/mode line drawing as a separate ui method 2015-06-17 21:28:02 +01:00
Maxime Coste
7417c5e9e2 Resolve symbol names in Cygwin Backtrace::desc implementation 2015-06-16 18:49:56 +01:00
Maxime Coste
d8e2e9e043 Small formatting fix 2015-06-15 23:00:37 +01:00
Maxime Coste
3fb783f7f9 Add <a-;> in insert mode to execute a single normal mode command 2015-06-12 13:56:11 +01:00
Maxime Coste
84d8447a58 Notify user on kakrc parsing errors
Fixes #281
2015-06-12 13:43:46 +01:00
Maxime Coste
2c15dbe6b2 Fix regions highlighter docstring 2015-06-11 19:04:30 +01:00
Maxime Coste
0555288e46 Show main selection search pattern on '*'
Fixes #278
2015-06-10 22:48:15 +01:00
Maxime Coste
46b167b851 Style tweak 2015-06-10 22:42:07 +01:00
Maxime Coste
e5852f6822 Fix race condition ShellManager::eval with SIGCHLD 2015-06-09 20:28:24 +01:00
Maxime Coste
b4329dd643 Fix comment 2015-06-09 13:27:51 +01:00
Maxime Coste
409d804ee8 Do not close stderr/stdout before program finish
Programs like grep called in '$' command will fail due to SIGPIPE
for example. So we need to keep the pipe open.
2015-06-08 22:42:51 +01:00
Maxime Coste
66866aafd3 Change gl/gh to only move cursor, not selecting (<a-h>/<a-l>) are unchanged
That is more consistant with other goto commands (that just move the cursor)
2015-06-08 13:51:06 +01:00
Maxime Coste
942fc224af Specify if ShellManager should read output or not using a flag
Some program (xclip), will fork a daemon keeping stdout/stderr open,
so waiting for them to be closed make kakoune hang. Commands discarding
stdout can then just not wait on it.
2015-06-08 13:45:20 +01:00
Maxime Coste
7acf3da3ca Change select_to_eol implementation 2015-06-07 23:17:23 +01:00
Maxime Coste
e6f0e8ef75 Move write_debug to buffer utils as write_to_debug_buffer 2015-06-06 11:54:48 +01:00
Maxime Coste
be03db9a24 Support sourcing files that use crlf end of lines 2015-06-05 13:52:56 +01:00
Maxime Coste
7bff1b782e Merge branch 'mode-stack' 2015-06-05 13:16:31 +01:00
Maxime Coste
d6d81607ed Gracefully handle reloading a file that was deleted 2015-06-05 13:11:04 +01:00
Maxime Coste
87fcfda508 Avoid buffer end in compute_modified_ranges 2015-06-05 13:10:30 +01:00
Maxime Coste
7cddaacc5d Fix support for default face on remote clients 2015-06-04 18:51:00 +01:00
Maxime Coste
f39b450e94 on_enabled might change mode, so assert Normal mode before 2015-06-04 13:56:08 +01:00
Maxime Coste
b34d469b72 Merge branch 'master' into mode-stack 2015-06-04 13:54:03 +01:00
Maxime Coste
9668dccea9 Add support for Default face
The Default face is used to set default color values, if set
to default (the default), refers to terminal default colors.
2015-06-04 13:49:28 +01:00
Maxime Coste
f30cd317b0 Describe facedesc in :face docstring 2015-06-03 22:10:37 +01:00
Maxime Coste
64a3b0bd50 Fix memory leak in fifo buffer handling 2015-06-03 20:22:26 +01:00
Maxime Coste
f0886ad323 Get rid of the mode trash, delete mode directly when leaving on_key 2015-06-03 20:03:06 +01:00
Jiří Konečný
ff27b190eb Fix Makefile for Fedora packaging system
There was a problem with absolute path for symlink.
I think most of the packaging systems will be affected by this problem.
2015-06-02 22:38:20 +02:00
Maxime Coste
964b0e9a6e InputHandler now uses a stack for active modes
instead of having a single mode enabled, modes can be pushed/poped,
with the top of the stack being the active mode.
2015-06-02 20:56:57 +01:00
Maxime Coste
8f6fc6a0f3 Port even more code to use format function 2015-06-01 21:15:59 +01:00
Maxime Coste
f19bb4fe6d Port more code to use the format function instead of adhoc string concat 2015-06-01 19:06:35 +01:00
Maxime Coste
57a03d8495 Remove redundant forward declaration 2015-06-01 18:33:08 +01:00
Maxime Coste
2426384360 Autoload site wide kak scripts if the user does not have his own autoload folder 2015-05-30 14:32:04 +01:00
Maxime Coste
c61c76061f Improve CYGWIN bactrace description 2015-05-30 12:40:24 +01:00
Maxime Coste
5aba5d38f2 Add missing include 2015-05-29 13:46:49 +01:00
Maxime Coste
be9da616df Return a String in Backtrace::desc 2015-05-29 13:35:54 +01:00
Maxime Coste
3c86484c4e Extract xmessage/MessageBox support in a notify_fatal_error function 2015-05-29 13:35:09 +01:00
Maxime Coste
336df38237 Go back to ignoring SIGPIPE
We do not want to exit when a shell command closes stdin while we
are piping data to it.
2015-05-28 13:57:22 +01:00
Maxime Coste
98637c5219 Do not throw exceptions when handling a fatal signal 2015-05-28 13:44:59 +01:00
Maxime Coste
d9aee67c8b Tweak Makefile, enable -rdynamic so that backtraces symbols are found 2015-05-27 18:45:52 +01:00
Maxime Coste
faf55c6540 Only try to run xmessage on Linux 2015-05-27 18:45:48 +01:00
Maxime Coste
2e43a4d696 Use common signal handler for SIGPIPE 2015-05-27 13:57:41 +01:00
Maxime Coste
e18c57cfd3 Include backtrace in debug info in on_assert_failed 2015-05-27 13:56:27 +01:00
Maxime Coste
7245d2abe9 Extract Backtrace out of SafePtr as a general utility 2015-05-27 13:48:45 +01:00
Maxime Coste
1e04343178 Workaround incomplete c++11 stdlib in gcc 4.8 2015-05-26 19:05:11 +01:00
Maxime Coste
993e842fdf Retreat ! go back to C++11 only code
This reverts commit b42de85031.
2015-05-26 18:42:09 +01:00
Maxime Coste
499bde10bd Small style tweaks 2015-05-26 18:40:39 +01:00
Maxime Coste
3bdc30e381 Try matching functions one by one when completing
Instead of running them all then deciding which to use.
2015-05-26 18:38:48 +01:00
Maxime Coste
3ca69c3852 Try gnu++1y 2015-05-25 20:32:39 +01:00
Maxime Coste
d83836d026 Use gnu++14 only for Cygwin, as not recognized on OSX 2015-05-25 19:35:32 +01:00
Maxime Coste
9c57f5409a Use gnu++14, as some posix functions disappear in c++14 mode 2015-05-25 14:01:59 +01:00
Maxime Coste
7b7427e1a6 Add missing 'override' specifiers 2015-05-25 13:54:18 +01:00
Maxime Coste
b42de85031 Migrate code to c++14 2015-05-25 13:51:17 +01:00
Maxime Coste
41319d2708 Small refactor in unit tests 2015-05-24 22:34:05 +01:00
Maxime Coste
dd25dcc361 Move unit test functions in next to the code they are testing 2015-05-22 13:58:56 +01:00
Maxime Coste
c38a7f3ca4 Merge branch 'diff' 2015-05-21 22:58:50 +01:00
Maxime Coste
325cc2d894 Ignore SIGPIPE 2015-05-20 22:53:14 +01:00