Skip to content

Commit

Permalink
Fix keyboard navigation commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Discookie committed Feb 9, 2022
1 parent e4eb7bf commit 0a3643b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/editor/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class NavigationHandler {

for (const [idx, path] of reprPath.entries()) {
// Check location first
if (window.activeTextEditor.document.uri.fsPath !== entry.file.original_path) {
if (window.activeTextEditor.document.uri.fsPath !== path.file.original_path) {
continue;
}

Expand All @@ -119,8 +119,8 @@ export class NavigationHandler {
const range = new Range(
path.range.start_line-1,
path.range.start_col-1,
path.range.start_line-1,
path.range.start_col,
path.range.end_line-1,
path.range.end_col,
);

if (range.contains(cursor)) {
Expand Down Expand Up @@ -148,7 +148,7 @@ export class NavigationHandler {
if (stepIdx < reprPath.length - 1) {
const step = reprPath[stepIdx + 1];

window.showTextDocument(Uri.file(entry.file.original_path), {
window.showTextDocument(Uri.file(step.file.original_path), {
selection: new Range(
step.line - 1,
step.column - 1,
Expand All @@ -172,7 +172,7 @@ export class NavigationHandler {
if (stepIdx > 0) {
const step = reprPath[stepIdx - 1];

window.showTextDocument(Uri.file(entry.file.original_path), {
window.showTextDocument(Uri.file(step.file.original_path), {
selection: new Range(
step.line - 1,
step.column - 1,
Expand Down

0 comments on commit 0a3643b

Please sign in to comment.