дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-08 19:02:17 +02:00
feat(vcs): Accept a diff change from the keyboard and step between diff files (#158)
- Accept Left Side / Accept Right Side copy the change at the caret to the other side of a side-by-side diff (⌃⌘→ / ⌃⌘← on macOS, Ctrl+Alt+R / Ctrl+Alt+A on Windows). - Compare Next File / Compare Previous File open the neighbouring file of the diff chain directly (⌃⇧→ / ⌃⇧← on macOS, Alt+Shift+→ / ← on Windows).
Цей коміт міститься в:
1 джерело
cfd2970531
коміт
b35035f8d9
9 files changed
+80
-7
No files matched your search
@@ -84,7 +84,7 @@ class RevertWidget extends WidgetType {
|
||||
}
|
||||
}
|
||||
|
||||
function chunkAt(chunks: readonly Chunk[], side: "a" | "b", pos: number, docLength: number): number {
|
||||
export function chunkAt(chunks: readonly Chunk[], side: "a" | "b", pos: number, docLength: number): number {
|
||||
return chunks.findIndex((c) => {
|
||||
const [from, to] = side === "a" ? [c.fromA, c.toA] : [c.fromB, c.toB];
|
||||
return from === to ? pos === from : pos >= from && pos < Math.max(to, from + 1) && pos <= docLength;
|
||||
|
||||
Reference in new issue
Заблокувати користувача