Commit Graph

299 Commits

Author SHA1 Message Date
Olivier Perret
a20ecf6b00 Use <esc> to exit on-key modes 2017-09-21 11:53:10 +02:00
Maxime Coste
df6b39ab60 Hide info box and eventual status message after handling a mouse event
Fixes #1566
2017-09-12 11:38:17 +08:00
Maxime Coste
1709886873 avoid literal eol in status lines, replace them with another symbol 2017-08-29 10:01:43 +07:00
Maxime Coste
8a2b8a9498 Do not consider the 8th bit to mean Alt on keys that are mouse events
Fix handling of mouse events for columns 128 to 223, we are still limited
by ncurses for columns > 223.
Fixes #1532
2017-08-16 00:40:45 +07:00
Maxime Coste
d75a835ca1 Merge remote-tracking branch 'Delapouite/main_index' 2017-07-23 23:15:51 +02:00
Maxime Coste
f87afbcb65 Detect overflow using a long long for the computation result.
Closes #1306
2017-07-19 17:55:48 +02:00
Maxime Coste
a9455bf132 Tolerate that the cursor might not be visible
Sometimes, like if the window is not high enough, we might not be
able to display any buffer lines, hence not have the cursor visible.

Fixes #1502
2017-07-16 13:12:17 +09:00
Delapouite
287a20c485 Add main selection index in mode_info 2017-07-12 19:08:13 +02:00
Maxime Coste
8cad40a0c9 Merge remote-tracking branch 'Delapouite/stars-less' 2017-07-08 13:31:17 +09:00
Maxime Coste
b51d19bfaa Formatting fixes 2017-07-07 13:59:53 +09:00
Delapouite
9254363673 Make register and completion autoinfo lists uniform with all the other ones 2017-07-06 18:47:02 +02:00
Maxime Coste
9bbab690ba Merge remote-tracking branch 'danr/Expose-last-entered-command-in-register' 2017-06-29 07:29:32 +01:00
Maxime Coste
641acc5943 Do not allow repeating last insert when we are not in normal mode
<a-;>. is not accepted anymore. Note that <a-;> are not repeatable
currently anyway (That could be fixed, athough not trivial).
Fixes #1469
2017-06-27 09:57:10 +01:00
Maxime Coste
8a2ece78b7 Remember count when repeating last insert
Fixes #1465
2017-06-25 07:25:31 +01:00
Maxime Coste
430e4495f0 Merge remote-tracking branch 'nuao/autoshowcompl_opt' 2017-06-23 10:20:34 +01:00
Maxime Coste
806d885eaf Do not set idle timers when running in a transient context 2017-06-23 10:01:24 +01:00
nuao
ddc846cf89 Use user-supplied autoshowcompl option's value. 2017-06-17 18:07:45 +01:00
Maxime Coste
42f03fb71f Hide info/menu when they are anchored to an invisible buffer coord
Fixes #1444
2017-06-16 10:19:08 +01:00
Maxime Coste
01a1e92b79 Fix crash recently introduced when deleting at buffer start in insert mode 2017-06-15 17:35:48 +01:00
Maxime Coste
242f951c84 More explicit and simpler code 2017-06-09 09:54:18 +01:00
Maxime Coste
4ab40af3a9 Disable idle timers on all transient contexts 2017-06-08 09:53:23 +01:00
Maxime Coste
03f8679e5c Only trigger PromptEvent::Change on idle
There is no need to trigger that event on every keystroke, we can
trigger it only when we hit the idle timeout, avoiding computations
when input keys are pasted.
2017-06-07 20:16:19 +01:00
Maxime Coste
72acb0177d Parse meta as 8 bit in Normal mode to fix the terminals using that
The solution is a bit hackish, as we only consider the 8th bit to
mean alt in normal mode, because its unlikely accentuated characters
are going to be mapped there. It fixes using Alt on xterm, and
probably on iterm2 as well (not requiring the meta-sends-esc config
change anymore)
2017-05-27 06:18:39 +01:00
Maxime Coste
11f924c528 Use a ScopedSetBool instead of manual set/unset for InputModes::Normal::m_in_on_key 2017-05-26 08:28:34 +01:00
Dan Rosén
b1735ae76e Expose last entered command in register : 2017-05-25 21:48:41 +02:00
Maxime Coste
7ee3039a79 Do not avoid eol in insert mode vertical movement 2017-05-22 17:04:01 +01:00
Maxime Coste
28bcb45b92 Fix bug where idle timers of disabled modes were still run 2017-05-22 16:57:22 +01:00
Maxime Coste
3917d26709 small code cleanups 2017-05-17 20:17:16 +01:00
Maxime Coste
5ee21ec932 Respect tabstop in Buffer::offset_coord 2017-05-07 16:26:14 +01:00
Maxime Coste
93408e4b76 Do not use any display information to determine where the cursor moves 2017-05-07 16:26:14 +01:00
Maxime Coste
91bfd714e4 Place hardware terminal cursor at the current main cursor/prompt cursor position
Fixes #1318
Also fixes https://gitlab.com/gnachman/iterm2/issues/5408
2017-04-12 10:39:17 +01:00
Maxime Coste
f31e898f13 Change prompt completion to only update when idle 2017-04-03 18:11:09 +01:00
Maxime Coste
2cfe3cae36 Add an InsertDelete hook 2017-03-30 10:38:56 +01:00
Maxime Coste
8b1078e510 Use a HashMap to store the normal mode keymap 2017-03-16 23:40:38 +00:00
Maxime Coste
e44f95820e Fixes some clang-tidy warning and add a few missing meta.hh include 2017-03-16 23:34:02 +00:00
Maxime Coste
6373338c50 Replace uses of UnorderedMap with HashMap 2017-03-07 01:03:26 +00:00
Maxime Coste
e3cfde6d07 Add docstring support for mappings, and use them in autoinfo
Fixes #105
Fixes #1100
Closes #1165
2017-03-03 20:16:36 +00:00
Maxime Coste
d470bd2cc9 Make numeric registers setable
Fixes #1214
2017-02-14 00:02:01 +00:00
Maxime Coste
d90919568a Also execute prompt callback when just starting
incsearch will immediatly display the result of using an empty
string (reusing the search register content).

Fixes #1174
2017-02-01 23:04:37 +00:00
Maxime Coste
aa7241067e Only restore cursor position after an append if we still have cursor > anchor
Fixes #1158
2017-01-25 13:36:06 +00:00
Maxime Coste
4916ea1766 Fix capture group handling
Fixes #1129
2017-01-13 00:17:31 +00:00
Delapouite
f51d03b0d8 Fix: add missing pipe register in info 2017-01-10 12:34:37 +01:00
Maxime Coste
9f0bca53c4 Small code cleanups 2017-01-08 23:26:15 +00:00
Maxime Coste
dcd8f6ef01 Apply clang-tidy modernize to the codebase 2017-01-08 22:39:01 +00:00
Kevin Ballard
b0c2444466 Change the message when entering insert mode while readonly 2016-12-27 12:23:15 -08:00
Maxime Coste
62df6dbb46 Display a message when entering insert mode while readonly
Fixes #1050
2016-12-21 06:39:58 +00:00
Maxime Coste
71cc9f1011 Fix reentrancy in InputeModes::Normal::on_key 2016-12-15 09:46:10 +00:00
Maxime Coste
735b1e1dc5 Add support for readline like <c-k> and <c-u> in prompts 2016-12-14 00:28:46 +00:00
Maxime Coste
5d9f3b7f3f Ensure the line is correctly clamped in scroll_window
Seems like the previous implementation was not always doing that
correctly, so just use an obviously correct method.

Fixes #951
2016-12-10 13:33:42 +00:00
Maxime Coste
d9679db9b6 Fix scrolling generating invalid buffer coordinates 2016-12-07 00:08:41 +00:00