Maxim Baz
5d689858df
Improve comment-line command
2018-06-28 23:47:48 +02:00
Maxime Coste
43b72770ec
Fix wrong logic for moving filedescriptors leading to closed stdin
...
With this fix, tests can now use /dev/null as stdin.
Fixes #2165
2018-06-28 22:56:50 +10:00
dahlbaek
28637cec9e
Use egrep instead of grep for ERE
...
Some implementations of grep do not support extended regular
expressions (ERE). Using egrep instead seems to be more portable.
2018-06-22 20:35:36 +02:00
Maxime Coste
667777521b
Refactor the way main selection is determined after rotating contents
...
Fixes #2133
2018-06-21 08:07:17 +10:00
Maxime Coste
6dca67c674
Fix two <s-tab> requiered to access last completion in prompt
...
A single <s-tab> should be enough.
2018-06-19 07:40:52 +10:00
Maxime Coste
9b89652b0b
Fix potential assert on itersel selection restoration
...
We cannot guarantee after an itersel that selections are going to
still be in ascending order, but we were calling a SelectionList
constructor that was assuming this was the case.
2018-05-24 08:08:51 +10:00
Maxime Coste
878d2a4bdb
Add regression test for crash on BufSetOption hook
2018-05-21 20:36:25 +10:00
Maxime Coste
8c6af54db3
c-family.kak: Fix comment line continuation behaviour
...
Fixes #2043
2018-05-19 14:15:16 +10:00
Maxime Coste
c9a8658671
Fix assert with window small enough so that no part of buffer is displayed
...
Fixes #2056
2018-05-19 14:15:16 +10:00
Maxime Coste
a64afd7f1a
test/run: Support a "ui-in" file containing json-rpc messages
...
With this "ui-in", tests can execute json-rpc commands from the UI
at startup to set a specific UI state.
2018-05-19 14:15:16 +10:00
Maxime Coste
851494a374
test/run: Rename "display" expected ui output file as "ui-out"
2018-05-19 14:15:16 +10:00
Maxime Coste
148d6c205b
Fix wrong behaviour in select surrounding
...
Fixes #2030
2018-05-07 22:17:57 +10:00
Maxime Coste
e4f90e5ed2
Fix tests after changes to json_ui output
2018-04-29 23:06:24 +10:00
Delapouite
746b9acb96
Change client default name: "unnamed0" → "client0"
2018-04-23 11:42:11 +02:00
Maxime Coste
567c82840a
ruby.kak: Refactor end autoinsertion logic to be more robust
...
Fixes the bug described by PR #1994
2018-04-14 12:47:42 +10:00
Nate Clark
27604359d4
Add test for buggy ruby method newline
...
Currently, inserting a newline after a ruby method will incorrectly
cause the following line to repeat the method header. This commit
adds a test case to illustrate the bug.
2018-04-10 18:30:12 -05:00
Maxime Coste
1f6c2b87ff
Support count in <a-s> to split on groups of n lines
...
Fixes #1966
2018-03-27 22:33:58 +11:00
Maxime Coste
3d3a37a80c
Fix 'O' not putting the cursor on the correct line
2018-03-27 07:28:25 +11:00
Maxime Coste
ec7f3738ee
Move rotate selection and rotate selection contents to ) and <a-)>
...
Backward rotation are supported with (.
Fixes #1210
2018-03-25 11:39:26 +11:00
Maxime Coste
59e9108812
indent selector: When line is empty, find indent from surrounding lines
...
Look for the first non empty line preceeding the current line, or
if not found, the first non empty line following it.
Fixes #1904
2018-03-25 10:25:56 +11:00
Maxime Coste
ac91a79b12
Fix implementation of real_path to handle non-existing directories in /
...
Fixes #1937
2018-03-18 23:23:00 +11:00
Maxime Coste
7ba4ef897b
Fix crash on expanding command line strings
2018-03-18 04:58:15 +11:00
Maxime Coste
e66073bc94
Detect infinit recursion in reference highlighting
...
Reference highlighters allow for potential mutual recursion between
highlighters. This is usually fine, but if the recursion happens on
the same buffer range, it means we will recurse infinitely.
Fixes #1920
2018-03-11 11:44:10 +11:00
Maxime Coste
4584ecac77
Move WORD text object to <a-w>
...
It improves consistency and it looked like there was support for that
change on github.
Fixes #1861
2018-03-10 00:25:19 +11:00
Maxime Coste
31a5649c65
Add a regression test for issue #1902
2018-03-05 05:48:20 +11:00
Maxime Coste
65258934d3
lua.kak: Rework 'end' auto insertion logic
...
Fixes #1525
2018-03-04 10:36:32 +11:00
Maxime Coste
2fd42fe5fc
Insert: Do not move end of line on open line (o/O)
...
Change the logic of open line commands so that if a selection lies
on the end of line character of the line from which we open a new
line, that selection does not move.
If we have two clients, A and B, with B's cursor on the eol character
of line L, and A hits `o` while on line L, B's cursor should stay
on the same (logical) line. Previous behaviour would make B's cursor
jump on the newly inserted line.
2018-03-04 10:32:21 +11:00
Maxime Coste
850f561096
Merge remote-tracking branch 'alyssais/1525-test_case'
2018-03-04 01:44:08 +11:00
Alyssa Ross
79af68843e
Add Ruby indentation test
...
See https://github.com/mawww/kakoune/issues/1525#issuecomment-324571751 .
2018-03-02 13:13:19 +00:00
Delapouite
c4eb4438d2
Remove <scope> from user-modes commands
2018-03-02 09:28:27 +01:00
Delapouite
a6a1c34288
Add -lock switch to enter-user-mode command
2018-02-27 19:55:00 +01:00
Maxime Coste
67424aae1e
Remove avoidance of end of lines
...
Various places in Kakoune code used to modify selections so that
cursors would not lie on an end of line. Remove those to increase
Kakoune's consistency and simplicity.
Now that end of lines are highlighted separately, they should not
be handled specially in most commands.
2018-02-25 00:05:05 +11:00
Maxime Coste
6a6e71dc0f
Highlight cursors differently when they lie on an end of line
...
When on an end of line, certain behaviours can be surprising, for
example delete will join the following line (which makes sense, and
is consistent, but hard to predict if we do not know the cursor is
on and end of line).
As Kakoune is moving more and more towards treating end of lines
as any other character, making it clear when the cursor lies on
them seems like a good way to reduce surprise.
2018-02-24 21:32:01 +11:00
Maxime Coste
a0de41d165
goto last change: do not try to avoid end of lines
...
Avoiding end of line is a behaviour we avoid (pun intended) more and more
in Kakoune source code, now that end of lines are regularly selected, it
makes no sense to just to next line when last modification lies on an EOL
(and it probably did not make much sense back when that code was written).
2018-02-24 21:09:09 +11:00
Maxime Coste
cda1fdafe2
test: fix run script after changes jump list behaviour
...
source the rc file *after* selecting the target text to ensure
eventual hooks will not interfere.
2018-02-24 20:59:31 +11:00
Maxime Coste
99d1fee44c
Merge remote-tracking branch 'Delapouite/trim'
2018-02-22 22:06:27 +11:00
Maxime Coste
f88195d2d9
Merge remote-tracking branch 'Delapouite/user-mode'
2018-02-18 20:20:35 +11:00
Delapouite
fccfc76e89
Add trim_selections primitive
2018-02-13 14:35:10 +01:00
Delapouite
6b447a0ecb
Add declare-user-mode / enter-user-mode commands
2018-02-12 14:19:58 +01:00
Maxime Coste
fbe68f375e
test: fix run script use of non standard \+
in sed regex
2018-02-07 19:38:13 +11:00
Maxime Coste
e2c1d44a7f
Fix parsing of percent tokens with unicode separators
2018-02-06 20:29:08 +11:00
Maxime Coste
05f57ace07
CommandManager: parse command lines as utf8 instead of ascii
...
Fixes #1829
2018-02-04 09:21:15 +11:00
Maxime Coste
9bf1f202d5
Add unit tests for copy selections commands
2018-01-24 10:45:12 +11:00
Maxime Coste
cafecda230
Window: avoid positionning window on a negative column
...
Fixes #1741
2017-12-15 08:17:35 +11:00
Maxime Coste
1a38849086
c-family.kak: indent after parenthesis at end of line
2017-12-03 17:47:44 +08:00
Maxime Coste
c8f5935c48
test/: Add more tests for object selection corner cases
2017-12-03 17:12:33 +08:00
Maxime Coste
1371148588
test: fix support for '(' in initial selected text
2017-12-03 17:12:33 +08:00
Maxime Coste
380ff553b5
Wrap: try to rework and simplify the algorithms further
...
Fixes #1731
2017-11-28 19:04:21 +08:00
Delapouite
a071e5b226
Add count support to jumps (<c-o> and <c-i>). Add jumps tests
2017-11-13 08:38:43 +01:00
Maxime Coste
fc88046c9c
Add test case for replaying insert with normal mode commands
2017-11-08 14:49:19 +08:00