Let a spelling or grammar issue be dismissed
Not every flag deserves a fix, so give the checkers a way to be told no: - ✖ beside an issue in the panel, and a matching entry in the editor's right-click menu, wave that issue away. - A dismissal is remembered as the offending text paired with the message rather than a byte range, since offsets move as soon as you type. Both checkers filter their fresh results against it, so a dismissed complaint stays gone across re-checks and repeats of the same phrase in the file. - The panel header counts the dismissals and ↩ takes them back. The offline spell check then rebuilds its own list; LanguageTool's can only come from the server, so those are dropped with a nudge towards ✓ Check. Dismissals belong to the open file and the session — they are cleared when another file or workspace is opened, and never written to disk. A name or invented term still belongs in the word list, which persists. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011CVsxwa6YukFS2YFUY8W2j
This commit is contained in:
@@ -34,6 +34,7 @@ impl App {
|
||||
self.dirty = false;
|
||||
self.pending_delete = false;
|
||||
self.clear_lt();
|
||||
self.dismissed.clear();
|
||||
self.session_start_counts = self.snapshot_counts();
|
||||
self.file_meta = self.snapshot_file_meta();
|
||||
self.rebuild_field_names();
|
||||
@@ -365,6 +366,8 @@ impl App {
|
||||
self.spell_dirty = true;
|
||||
self.spell_last_edit = None;
|
||||
self.spell_menu = None;
|
||||
// Dismissals are about this file's sentences, not the next one's.
|
||||
self.dismissed.clear();
|
||||
let Some(name) = self.files.get(idx).cloned() else {
|
||||
return;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user