-
Notifications
You must be signed in to change notification settings - Fork 78
Commit 678a582
feat: redesign diff view with horizontal layout and new tab options (#111)
# Improved Diff View Layout and Configuration
This PR refactors the diff view functionality to provide more flexible layout options and better tab management:
- Added a new `layout` option to replace the previous `vertical_split` boolean, supporting both "vertical" and "horizontal" layouts
- Replaced `open_in_current_tab` with `open_in_new_tab` for more intuitive configuration
- Removed redundant options `auto_close_on_accept` and `show_diff_stats` that were no longer used
- Added proper type annotations for configuration options
- Implemented improved window management when opening diffs in new tabs
- Added terminal window preservation when opening diffs in new tabs
- Improved window option handling to maintain consistent appearance across different layouts
- Enhanced cleanup logic to properly handle both tab-based and window-based diff views
- Updated tests to reflect the new configuration options
These changes make the diff view more customizable while simplifying the configuration interface. Users can now choose between vertical or horizontal layouts and easily open diffs in new tabs while maintaining access to the terminal.1 parent e21a837 commit 678a582
File tree
13 files changed
+1175
-271
lines changed- fixtures/nvim-tree
- lua/claudecode
- tests
- integration
- mocks
- unit
13 files changed
+1175
-271
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
289 | 289 |
| |
290 | 290 |
| |
291 | 291 |
| |
292 | + | ||
293 | + | ||
292 | 294 |
| |
293 | 295 |
| |
294 | 296 |
| |
295 | 297 |
| |
296 | 298 |
| |
297 | 299 |
| |
298 | 300 |
| |
301 | + | ||
302 | + | ||
299 | 303 |
| |
300 | 304 |
| |
301 | 305 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
43 | + | ||
43 | 44 |
| |
44 | 45 |
| |
45 | - | ||
46 | - | ||
47 | - | ||
48 | - | ||
46 | + | ||
47 | + | ||
48 | + | ||
49 | + | ||
49 | 50 |
| |
50 | 51 |
| |
51 | - | ||
52 | - | ||
52 | + | ||
53 | + | ||
53 | 54 |
| |
54 | 55 |
| |
55 | - | ||
56 | - | ||
57 | - | ||
56 | + | ||
57 | + | ||
58 | + | ||
58 | 59 |
| |
59 | 60 |
| |
60 | 61 |
| |
61 | - | ||
62 | - | ||
63 | - | ||
64 | - | ||
65 | - | ||
62 | + | ||
63 | + | ||
64 | + | ||
65 | + | ||
66 | 66 |
| |
67 | 67 |
| |
68 | 68 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | - | ||
3 | + | ||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 | - | ||
23 | - | ||
24 | - | ||
25 | - | ||
22 | + | ||
23 | + | ||
26 | 24 |
| |
25 | + | ||
27 | 26 |
| |
28 | 27 |
| |
29 | 28 |
| |
| |||
106 | 105 |
| |
107 | 106 |
| |
108 | 107 |
| |
109 | - | ||
110 | - | ||
111 | - | ||
112 | - | ||
108 | + | ||
109 | + | ||
110 | + | ||
111 | + | ||
112 | + | ||
113 | + | ||
114 | + | ||
115 | + | ||
116 | + | ||
117 | + | ||
113 | 118 |
| |
114 | 119 |
| |
115 | 120 |
| |
121 | + | ||
122 | + | ||
123 | + | ||
124 | + | ||
125 | + | ||
126 | + | ||
127 | + | ||
128 | + | ||
129 | + | ||
130 | + | ||
131 | + | ||
132 | + | ||
133 | + | ||
134 | + | ||
135 | + | ||
136 | + | ||
137 | + | ||
138 | + | ||
139 | + | ||
140 | + | ||
116 | 141 |
| |
117 | 142 |
| |
118 | 143 |
| |
| |||
160 | 185 |
| |
161 | 186 |
| |
162 | 187 |
| |
188 | + | ||
189 | + | ||
190 | + | ||
191 | + | ||
192 | + | ||
193 | + | ||
194 | + | ||
195 | + | ||
196 | + | ||
197 | + | ||
198 | + | ||
199 | + | ||
200 | + | ||
163 | 201 |
| |
164 | 202 |
| |
165 | 203 |
| |
|
0 commit comments