484 Commits

Author SHA1 Message Date
Stefan Haller
fc7119a393
Merge pull request #40 from jesseduffield/add-title-prefix 2023-09-09 09:41:55 +02:00
Maria José Solano
595ac9465e Add a TitlePrefix field to View 2023-09-09 09:39:42 +02:00
Stefan Haller
9f3df4a6da
Merge pull request #39 from jesseduffield/better-calculate-new-origin 2023-08-15 11:38:13 +02:00
Stefan Haller
64feb4098c If selected line is outside, move it to the middle of the view
... instead of scrolling just as much as necessary to make it visible again. For
example, when the cursor is on the last line and I press down-arrow, it would
previously only scroll by one line; now I scrolls by half a page. I prefer this
because it lets me see more of what's coming in the direction that I'm moving
to.

It doesn't only affect arrow keys; it also applies to selecting the next search
hit using "n" in the commits panel. I like it here too, it makes it easier to
see how many more hits are coming below.
2023-08-15 11:32:31 +02:00
Stefan Haller
300c2bd827 Extract function calculateNewOrigin 2023-08-15 11:32:31 +02:00
Stefan Haller
7cdc18a9ed Extract common code to after the if cascade 2023-08-15 11:32:31 +02:00
Jesse Duffield
83a7161c87
Merge pull request #38 from simonwhitaker/simonwhitaker/mouse-event-support
Add mouse event support
2023-08-07 19:00:44 +10:00
Simon Whitaker
b8cfdbe54a Add mouse event support
Needed so I can write an integration test for https://github.com/jesseduffield/lazygit/pull/2883, but should be useful in other situations too.
2023-08-06 11:10:58 +01:00
Stefan Haller
ac7b031088
Merge pull request #37 from jesseduffield/import-tcell-from-stefanhaller 2023-08-06 11:53:21 +02:00
stk
5dd3e67802 Import stefanhaller's tcell fork for real rather than just replacing it
This solves the problem that people trying to
"go install github.com/jesseduffield/lazygit@latest" would get the error

go: github.com/jesseduffield/lazygit@latest (in github.com/jesseduffield/lazygit@v0.40.0):
  The go.mod file for the module providing named packages contains one or
  more replace directives. It must not contain directives that would cause
  it to be interpreted differently than if it were the main module.
2023-08-06 08:20:03 +02:00
Stefan Haller
ae0a5c1816
Merge pull request #36 from jesseduffield/focus-handler
Focus handler
2023-08-02 11:28:15 +02:00
stk
49bc38fb19 Add FocusHandler
I decided to make this a global handler that can be set only once. Alternatively
we could consider dispatching focus events to the focused view similar to how we
do with key bindings; but then we'd need a way to dispatch it to parent views
that might also be interested. Since we don't need this functionality (yet?) I
went with the simplest solution for now.
2023-08-02 08:19:25 +02:00
stk
c670e30018 Point tcell at stefanhaller's fork 2023-08-02 08:19:25 +02:00
stk
034aef42db Bump tcell dependency to 2.6.0 2023-08-02 08:17:32 +02:00
Jesse Duffield
6fe43a628b Support non-english keywords typing special characters like '[' 2023-07-24 10:46:53 +10:00
Jesse Duffield
03e858e461 Better word wrap 2023-07-23 11:41:57 +10:00
Jesse Duffield
398f496524 Support passing width/height of simulation screen
Also switching from position args to an opts struct for NewGui given how many args we had
2023-07-19 22:04:01 +10:00
Jesse Duffield
ea5c8b64cf Handle views of negative height
This fixes an issue where collapsed views did not update the origin
upon focus. Not a perfect fix because it still goes to the top of the list
but good enough to make a new release
2023-07-19 20:37:19 +10:00
Jesse Duffield
9bbfd87371 Refactor 2023-07-10 10:44:07 +10:00
Jesse Duffield
44d9f78b4b better handling of tasks 2023-07-09 20:54:00 +10:00
Jesse Duffield
f7e1c7c168 Add tracking of busy/idle state 2023-07-08 22:24:37 +10:00
Jesse Duffield
d6c452fc12 Add method 2023-07-02 15:45:02 +10:00
Jesse Duffield
cb89273fdd
Merge pull request #35 from jesseduffield/contains-colored-text
Add ContainsColoredText method to View
2023-06-01 22:18:45 +10:00
Jesse Duffield
79ec199b8c Add ContainsColoredText method to View
Used for integration tests that need to assert on coloured text
2023-06-01 22:18:15 +10:00
Jesse Duffield
36f2e87458
Merge pull request #34 from jesseduffield/remove-old-recording-stuff 2023-03-24 18:39:41 +11:00
Jesse Duffield
1755e1461d remove old recording stuff 2023-03-24 18:38:11 +11:00
Jesse Duffield
e793609bfb
Merge pull request #33 from jesseduffield/more-muteses 2023-03-19 15:33:40 +11:00
Jesse Duffield
0a0558d896 use mutexes to avoid race condition 2023-03-19 15:31:51 +11:00
Jesse Duffield
8d2162479b
Merge pull request #32 from Ryooooooga/fix-escape-code 2023-03-14 19:14:53 +11:00
Ryooooooga
96d70b7dce
test(escape): add tests for escape codes 2023-03-12 21:26:50 +09:00
Ryooooooga
19c69f127d
chore(escape): add comments for escape codes 2023-03-12 21:26:50 +09:00
Ryooooooga
6384bbb52d
fix(escape): improve escape codes handling 2023-03-11 22:48:55 +09:00
Ryooooooga
37c5a8c463
style: $ go fmt 2023-03-11 22:27:41 +09:00
Jesse Duffield
cd05644a8f
Merge pull request #31 from Ryooooooga/fix-data-race 2023-03-11 20:13:20 +11:00
Jesse Duffield
38a4deaa7f use mutex when getting selected line 2023-02-25 11:14:50 +11:00
Jesse Duffield
06a1f1e95d add snapshot function for testing 2023-02-19 14:48:34 +11:00
Jesse Duffield
7a98151b05 adjust cursor when scrolling to keep current line selected.
This means the cursor can now take on a negative value, so we'll need to keep an eye out for bugs that arise from that
2023-02-18 10:26:59 +11:00
Jesse Duffield
d870d1e1c6 do not set cursor on mouse scroll 2023-02-18 10:26:27 +11:00
Ryooooooga
9bfaed0c35
fix: prevent data race 2023-02-08 09:09:22 +09:00
Jesse Duffield
457c516aa3
Merge pull request #30 from Ryooooooga/search-multibyte-chars 2023-02-05 10:28:25 +11:00
Ryooooooga
c7131d3f28
fix: fix search with multibyte characters 2023-02-04 14:15:01 +09:00
Jesse Duffield
a0bbbd86ba
Merge pull request #27 from yk-kd/add-double-border 2023-01-29 14:06:21 +11:00
Jesse Duffield
49803ff5b5
Merge pull request #29 from Ryooooooga/fix-subtitle-position
fix subtitle position
2023-01-29 11:39:45 +11:00
Ryooooooga
9cdf1743ce
fix: fix subtitle position 2023-01-26 21:56:58 +09:00
yk-kd
fcbedd46c6 changes to support new borders 2023-01-06 10:40:13 +09:00
Jesse Duffield
214a0df08d
Merge pull request #26 from Ryooooooga/fix-goroutine-leak
resolve https://github.com/jesseduffield/lazygit/issues/1502
2023-01-06 09:45:02 +11:00
Ryooooooga
c0956a0eec
feat: change StartTicking to receive ctx 2023-01-03 23:09:47 +09:00
Jesse Duffield
eeb9b3fb24
Merge pull request #25 from Ryooooooga/fix-goroutine-leak
fix goroutine leak
2022-12-04 10:32:51 +11:00
Ryooooooga
179315ce35
fix: fix goroutine leak 2022-12-02 20:35:27 +09:00
Jesse Duffield
154bebde5b
Merge pull request #24 from Ryooooooga/ignore-osc
Ignore OSC sequence
2022-11-12 19:15:29 +11:00