Skip to content

Commit

Permalink
Desktop: Fixes laurent22#10672: Fix using Vim as an external editor
Browse files Browse the repository at this point in the history
Removes an obsolete workaround fix for
paulmillr/chokidar#591. This seems to fix
external editing with Vim.
  • Loading branch information
personalizedrefrigerator committed Jul 3, 2024
1 parent 6ea1ac0 commit 4b78e81
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions packages/lib/services/ExternalEditWatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,17 +159,6 @@ export default class ExternalEditWatcher {
this.logger().error('ExternalEditWatcher: error');
}
});
// Hack to support external watcher on some linux applications (gedit, gvim, etc)
// taken from https://github.com/paulmillr/chokidar/issues/591
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
this.watcher_.on('raw', async (event: string, _path: string, options: any) => {
const watchedPath: string = options.watchedPath;
this.logger().debug(`ExternalEditWatcher: Raw event: ${event}: ${watchedPath}`);
if (event === 'rename') {
this.watcher_.unwatch(watchedPath);
this.watcher_.add(watchedPath);
}
});
} else {
this.watcher_.add(fileToWatch);
}
Expand Down

0 comments on commit 4b78e81

Please sign in to comment.