Mark unsaved named files as dirty (#1598)

This commit is contained in:
Guldoman 2023-10-18 06:45:31 +02:00 committed by takase1121
parent 82589526c0
commit 1ad3b70e9e
No known key found for this signature in database
GPG Key ID: 60EEFFC68EB3031B
1 changed files with 1 additions and 0 deletions

View File

@ -123,6 +123,7 @@ end
function Doc:is_dirty()
if self.new_file then
if self.filename then return true end
return #self.lines > 1 or #self.lines[1] > 1
else
return self.clean_change_id ~= self:get_change_id()