Commit Graph

146 Commits

Author SHA1 Message Date
Anthony Sottile
3c30b25238 Split XDG lookup to a function 2020-02-22 15:35:10 -08:00
Anthony Sottile
1b9114e050 Merge pull request #33 from asottile/split_file
Split babi.py into separate file
2020-02-22 15:17:58 -08:00
Anthony Sottile
a2ffbfd0de Move Screen to babi.screen 2020-02-22 15:11:08 -08:00
Anthony Sottile
babb024c51 move File into its own file 2020-02-22 14:47:14 -08:00
Anthony Sottile
a207ba6302 split out History 2020-02-22 14:33:55 -08:00
Anthony Sottile
9343805ad0 move Perf to its own module 2020-02-22 14:33:55 -08:00
Anthony Sottile
8693894fae Split out Status 2020-02-22 14:33:55 -08:00
Anthony Sottile
524dca9c7a move Prompt to a separate module 2020-02-22 14:33:55 -08:00
Anthony Sottile
b7bb28bd76 move Margin to its own module 2020-02-22 14:33:55 -08:00
Anthony Sottile
e2b5d533b6 Split ListSpy to its own module 2020-02-22 14:33:54 -08:00
Anthony Sottile
b7700b8588 convert babi into a package 2020-02-22 12:35:41 -08:00
Anthony Sottile
9683f15bcf Don't include the bottom line of selection if blank 2020-02-21 19:35:28 -08:00
Anthony Sottile
75151505a7 Add cProfile output to --perf-log 2020-02-19 18:46:25 -08:00
Anthony Sottile
e0b10e8b9c Remove --color-test 2020-02-17 17:08:26 -08:00
Anthony Sottile
a36ea5d1ed Set position at end when defaulting prompt 2020-01-08 22:20:01 -08:00
Anthony Sottile
1030f1170a Fix dedent at beginning of line 2020-01-08 21:16:53 -08:00
Anthony Sottile
de57f2cef2 Fix search default when equal to last history entry 2020-01-08 21:10:53 -08:00
Anthony Sottile
f1e8bcca3d Match the position of the reverse-search match in the prompt 2020-01-07 17:31:41 -08:00
Anthony Sottile
817b542861 Add small amount of performance logging 2020-01-07 17:12:42 -08:00
Anthony Sottile
8332979c28 Make get_char a method of Screen 2020-01-07 16:34:45 -08:00
Anthony Sottile
11c195e9bf Add faster test harness which fakes curses 2020-01-06 20:18:34 -08:00
Anthony Sottile
1c66b81dc3 typo in test name 2020-01-06 09:46:42 -08:00
Anthony Sottile
180ff20be5 Add :sort command 2020-01-06 09:23:53 -08:00
Anthony Sottile
083417399e Use A_DIM when highlighting
- this makes the highlight different from the cursor
- I think this is what vim does
2020-01-06 07:41:09 -08:00
Anthony Sottile
85af31c56f minor change to quick_prompt 2020-01-05 14:17:49 -08:00
Anthony Sottile
22db250ab8 Add indent / dedent
Resolves #27
2020-01-05 09:03:58 -08:00
Anthony Sottile
b08f533554 Make selection render like visual mode in vim
Note that this causes trailing whitespace if you copy out of the pane with
the mouse.  This is the same as how vim renders this though.  nano takes a
different approach which doesn't result in trailing whitespace, but I find it
more difficult to see whether the ends of lines are highlighted.

If later I want the nano behaviour, remove the `+ 1`s in this patch.
2020-01-05 07:35:12 -08:00
Anthony Sottile
865f2091a2 Add tests for ^BSpace (^H) 2020-01-04 12:04:04 -08:00
Anthony Sottile
78beaecec7 Make ^Backspace the same as Backspace
Unforunately no tests for this, it seems `tmux send-keys ^BSpace` is broken
2020-01-04 09:12:27 -08:00
Anthony Sottile
a893bf0b93 shift + movement = selection 2020-01-03 18:57:01 -08:00
Anthony Sottile
6137fac556 Compute modified state automatically with ListSpy 2020-01-03 11:55:27 -08:00
Anthony Sottile
3af21927cd Implement cut / uncut without prevkey 2020-01-03 09:54:20 -08:00
Anthony Sottile
cf9168a444 Simplify replace highlighting routine 2020-01-02 19:07:19 -08:00
Anthony Sottile
2bcb8f0ed0 Fix highlighting replacement on 1-tall screen 2020-01-02 18:51:31 -08:00
Anthony Sottile
6e1ad7eff6 Use keyname everywhere 2020-01-02 16:48:34 -08:00
Anthony Sottile
f32d8ba823 slightly simplify _scrolled_line 2020-01-02 16:41:03 -08:00
Anthony Sottile
1a5494b577 Rename cursor_y to y to reduce confusion 2019-12-31 22:25:26 -08:00
Anthony Sottile
60476134a3 Implement ^Left and ^Right in prompt() 2019-12-31 14:04:17 -08:00
Anthony Sottile
8914ad4ea1 Refactor prompt to be more extensible 2019-12-31 13:32:59 -08:00
Anthony Sottile
c16d974437 Move quick_prompt to Screen 2019-12-31 11:16:07 -08:00
Anthony Sottile
9518bf6143 Move rest of shortcuts to map pattern 2019-12-25 13:24:21 -08:00
Anthony Sottile
cd2572c6c1 Move some of the keyboard functions into Screen 2019-12-25 10:35:52 -08:00
Anthony Sottile
68ee9eafa6 Implement ^K for command mode 2019-12-25 09:09:38 -08:00
Anthony Sottile
ae5e619124 Add test for quick_prompt resize without callback 2019-12-21 23:53:38 -08:00
Anthony Sottile
7525e0bc84 Implement save-on-exit 2019-12-21 23:13:46 -08:00
Anthony Sottile
98f19ca6b2 Implement save via ^O (has a filename prompt) 2019-12-20 23:00:48 -08:00
Anthony Sottile
5251d7e9d1 make it harder to forget to scroll when inc/decrementing y 2019-12-15 15:55:36 -08:00
Anthony Sottile
5a81b4e4db fix flaky test based on pytest tempdir name 2019-12-15 15:51:29 -08:00
Anthony Sottile
c8e54634e3 fix tests, previous patch changed behaviour 2019-12-15 15:41:01 -08:00
Anthony Sottile
68ffc18e8c fix crash when resizing quickly with cursor at bottom 2019-12-15 15:21:23 -08:00