Maxime Coste
e6a9780490
Fix tabs-to-spaces an spaces-to-tabs with the selection refactor
2014-06-10 13:30:37 +01:00
Maxime Coste
f54f8818c6
Merge branch 'master' into remove-buffer-change-listener
2014-06-09 19:29:40 +01:00
Maxime Coste
4834504508
Do not touch the reference line in copy_indent
2014-06-09 19:27:57 +01:00
Maxime Coste
1ffafa8650
Merge branch 'master' into remove-buffer-change-listener
2014-06-06 00:22:46 +01:00
Maxime Coste
d33c27acdf
Move compute_modified_ranges to selection.cc and use an optimized approach
2014-06-02 15:13:56 +01:00
Maxime Coste
a5e028e1b1
Add Context::set_selections(std::vector<Selection>)
...
This methods avoids updating the context selection needlessly as
they are going to get replaced anyway.
2014-06-01 16:01:38 +01:00
Maxime Coste
1b30c0f4fb
Extract merge_overlapping as a free function template
2014-06-01 15:57:12 +01:00
Maxime Coste
49ab0c101a
Use forward iteration on selections, and take advantage of it when updating
...
SelectionList::update now is optimized for the common case where changes
are sorted, the algorithm is O(m*n) with m the number of sorted ranges
in the changes. In the common case, m should be very small.
2014-05-29 05:48:40 +01:00
Maxime Coste
72d6ed3575
Add 'n' for number object (inner number does not recognise '.')
2014-05-27 09:50:12 +01:00
Maxime Coste
e1c9e42213
Merge branch 'master' into remove-buffer-change-listener
...
Conflicts:
src/normal.cc
src/selectors.cc
src/selectors.hh
2014-05-27 00:35:12 +01:00
Maxime Coste
9aa38a1ea0
Rename select_whole_.* to just select_.*
2014-05-26 21:44:57 +01:00
Maxime Coste
9870ac22f6
Remove Modification
...
Lets consider that as a failed experiment.
You see, I learned something today, for a complicated problem, it
is important to keep as much knowledge of the exact problem as
possible. the Modification approach failed because it tried to
solve the general problem, which is quite complex. The new approach,
which keeps the knowledge that selections are sorted is much simpler
and faster (see f49bec8021
).
2014-05-26 21:09:12 +01:00
Maxime Coste
f49bec8021
Go back to Buffer::Change based implementation for SelectionList::update
...
However take into account the ordering of selections in insert and erase
methods, so that we update selection position cheaply.
2014-05-26 20:57:10 +01:00
Maxime Coste
b2621ca140
Move insert/erase methods from normal.cc to member functions in SelectionList
...
It does look like the Editor class is attempting a sneaky comeback...
2014-05-25 20:28:32 +01:00
Maxime Coste
1544a006c9
Fix selection update in when doing a 'replace' insert
2014-05-24 02:14:51 +01:00
Maxime Coste
b29cae4d16
Remove duplicated logic and fix insert in Replace mode
2014-05-19 18:59:14 +01:00
Maxime Coste
079d34b82a
Minor cleanup in SelectionList methods
2014-05-17 12:13:49 +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
bf98b38afd
Use a plain SelectionList for Context, remove DynamicSelectionList
2014-05-14 19:49:04 +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
ea3e92aa5e
SelectionList know its buffer and timestamp
2014-05-13 20:09:06 +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
db8a4ca318
SelectionList no longer inherit from std::vector
2014-05-12 18:59:00 +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
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
7190791927
Move some buffer related utility functions to buffer_utils.{cc,hh}
2014-04-28 19:48:23 +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
33de42610d
Add g. command to go to the last buffer modification position
2014-04-07 23:47:50 +01:00
Jimmy Thrasher
d2e9486f2d
Fix some more constexpr issues for clang
2014-04-03 13:56:03 -04:00
Maxime Coste
0fe9683c0f
Fix indent/deindent when only empty lines are selected
2014-03-29 09:02:09 +00:00
Maxime Coste
da9d099f3b
Remove Range struct, merge it back in Selection
2014-03-29 08:55:45 +00:00
Maxime Coste
159e0d049d
rotate selection content count parameter groups selections
...
the count parameter does not specify the rotation count, but
the size of the rotation groups. with 2 for exemple, selection
contents will be swapped for each pair (1 and 2, 3 and 4, ...)
2014-03-27 00:11:30 +00:00
Maxime Coste
e6f5b3c038
Display command info only when the autoinfo option is true
2014-03-02 01:08:11 +00:00
Maxime Coste
9451782648
Add command switches information, and automatically display it
2014-03-02 01:08:11 +00:00
Maxime Coste
bd331742d2
Add @ command for tabs to spaces and alt-@ for spaces to tabs
2014-03-02 01:06:13 +00:00
Maxime Coste
0cd82d0ebe
Rename align indent to more correct copy indent
2014-03-02 01:06:05 +00:00
Maxime Coste
daeefe2f33
Add support for strings
...
fixes #53
2014-02-15 00:36:00 +00:00
Maxime Coste
14f91e7132
Use a scoped edition when pasting
2014-02-12 00:03:01 +00:00
Maxime Coste
2159fc9563
Rename selections first,last to more explicit anchor,cursor
2014-01-28 19:06:52 +00:00
Maxime Coste
dbd194cea8
Fix autoinfo for angle bracket object
2014-01-27 21:11:45 +00:00
Maxime Coste
e364137196
Fix compilation with clang 3.4
2014-01-27 20:28:38 +00:00
Maxime Coste
bbf48e1d39
Honor incsearch option for select/split/keep
...
fixes #37
2014-01-27 19:51:58 +00:00
Maxime Coste
f6e5deae5a
Add 'a' alias to angle brackets text object
...
fixes #39
2014-01-23 19:45:09 +00:00
Maxime Coste
aadbd390c7
Use wide character function for categorizing codepoints
...
Previously we used the is... rather than isw...
These functions were not supporting non ascii characters correctly
2014-01-05 15:14:58 +00:00
Maxime Coste
6c4c32eb59
Rewrite join_select_spaces
...
Stop using regex for selecting spaces at the begining of the line
2014-01-03 20:41:47 +00:00