ignore kate-swp files (#2353)

This commit is contained in:
lauren n. liberda 2023-11-03 22:43:52 +01:00 committed by Vincent Prouillet
parent 23bd03fdfc
commit 1349947ed3
2 changed files with 3 additions and 0 deletions

View File

@ -199,6 +199,8 @@ pub fn is_temp_file(path: &Path) -> bool {
match ext {
Some(ex) => match ex.to_str().unwrap() {
"swp" | "swx" | "tmp" | ".DS_STORE" | ".DS_Store" => true,
// kate
"kate-swp" => true,
// jetbrains IDE
x if x.ends_with("jb_old___") => true,
x if x.ends_with("jb_tmp___") => true,

View File

@ -812,6 +812,7 @@ mod tests {
Path::new("hello.html.__jb_bak___"),
Path::new("hello.html~"),
Path::new("#hello.html"),
Path::new(".index.md.kate-swp"),
];
for t in test_cases {