vim: Add :<range>w <filename> command (#41256)

Release Notes:

- Adds support for `:[range]w {file}`
  - This writes the lines in the range to the specified
- Adds support for `:[range]w`
  - This replaces the current file with the selected lines
This commit is contained in:
AidanV
2025-11-13 13:27:08 -07:00
committed by GitHub
parent 03fad4b951
commit 84f24e4b62
2 changed files with 197 additions and 11 deletions
+5
View File
@@ -2055,6 +2055,11 @@ impl Buffer {
}
}
/// Marks the buffer as having a conflict regardless of current buffer state.
pub fn set_conflict(&mut self) {
self.has_conflict = true;
}
/// Checks if the buffer and its file have both changed since the buffer
/// was last saved or reloaded.
pub fn has_conflict(&self) -> bool {