Merge branch 'lite-xl:master' into lite-xl-windows-dark-theme-title-bar-support
This commit is contained in:
commit
7148c9b318
|
@ -102,7 +102,11 @@ end
|
|||
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
|
|
@ -44,8 +44,7 @@ static void get_exe_filename(char *buf, int sz) {
|
|||
int len = GetModuleFileName(NULL, buf, sz - 1);
|
||||
buf[len] = '\0';
|
||||
#elif __linux__
|
||||
char path[512];
|
||||
sprintf(path, "/proc/%d/exe", getpid());
|
||||
char path[] = "/proc/self/exe";
|
||||
int len = readlink(path, buf, sz - 1);
|
||||
buf[len] = '\0';
|
||||
#elif __APPLE__
|
||||
|
|
Loading…
Reference in New Issue