Merge branch 'lite-xl:master' into lite-xl-windows-dark-theme-title-bar-support

This commit is contained in:
Nikolai Sinyov 2021-10-12 18:04:29 +03:00 committed by GitHub
commit 7148c9b318
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

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

View File

@ -44,8 +44,7 @@ static void get_exe_filename(char *buf, int sz) {
int len = GetModuleFileName(NULL, buf, sz - 1); int len = GetModuleFileName(NULL, buf, sz - 1);
buf[len] = '\0'; buf[len] = '\0';
#elif __linux__ #elif __linux__
char path[512]; char path[] = "/proc/self/exe";
sprintf(path, "/proc/%d/exe", getpid());
int len = readlink(path, buf, sz - 1); int len = readlink(path, buf, sz - 1);
buf[len] = '\0'; buf[len] = '\0';
#elif __APPLE__ #elif __APPLE__