Merge branch master into dev
This commit is contained in:
commit
63a613fe17
|
@ -30,7 +30,7 @@ Under very specific situations the application was crashing due to invalid memor
|
||||||
|
|
||||||
Add documentation for keymap binding, thanks to @Janis-Leuenberger.
|
Add documentation for keymap binding, thanks to @Janis-Leuenberger.
|
||||||
|
|
||||||
Added a contibutors page in `doc/contributors.md`.
|
Added a contributors page in `doc/contributors.md`.
|
||||||
|
|
||||||
### 1.16.9
|
### 1.16.9
|
||||||
|
|
||||||
|
|
|
@ -89,10 +89,15 @@ command.add(nil, {
|
||||||
local view = core.active_view
|
local view = core.active_view
|
||||||
if view.doc and view.doc.abs_filename then
|
if view.doc and view.doc.abs_filename then
|
||||||
local dirname, filename = view.doc.abs_filename:match("(.*)[/\\](.+)$")
|
local dirname, filename = view.doc.abs_filename:match("(.*)[/\\](.+)$")
|
||||||
core.command_view:set_text(core.normalize_to_project_dir(dirname) .. PATHSEP)
|
if dirname then
|
||||||
|
dirname = core.normalize_to_project_dir(dirname)
|
||||||
|
local text = dirname == core.project_dir and "" or common.home_encode(dirname) .. PATHSEP
|
||||||
|
core.command_view:set_text(text)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
core.command_view:enter("Open File", function(text)
|
core.command_view:enter("Open File", function(text)
|
||||||
core.root_view:open_doc(core.open_doc(common.home_expand(text)))
|
local filename = system.absolute_path(common.home_expand(text))
|
||||||
|
core.root_view:open_doc(core.open_doc(filename))
|
||||||
end, function (text)
|
end, function (text)
|
||||||
return common.home_encode_list(common.path_suggest(common.home_expand(text)))
|
return common.home_encode_list(common.path_suggest(common.home_expand(text)))
|
||||||
end, nil, function(text)
|
end, nil, function(text)
|
||||||
|
|
|
@ -348,7 +348,7 @@ local commands = {
|
||||||
["doc:save-as"] = function()
|
["doc:save-as"] = function()
|
||||||
if doc().filename then
|
if doc().filename then
|
||||||
core.command_view:set_text(doc().filename)
|
core.command_view:set_text(doc().filename)
|
||||||
elseif core.last_active_view then
|
elseif core.last_active_view and core.last_active_view.doc then
|
||||||
local dirname, filename = core.last_active_view.doc.abs_filename:match("(.*)[/\\](.+)$")
|
local dirname, filename = core.last_active_view.doc.abs_filename:match("(.*)[/\\](.+)$")
|
||||||
core.command_view:set_text(core.normalize_to_project_dir(dirname) .. PATHSEP)
|
core.command_view:set_text(core.normalize_to_project_dir(dirname) .. PATHSEP)
|
||||||
end
|
end
|
||||||
|
|
|
@ -212,7 +212,9 @@ end
|
||||||
function common.home_encode(text)
|
function common.home_encode(text)
|
||||||
if HOME and string.find(text, HOME, 1, true) == 1 then
|
if HOME and string.find(text, HOME, 1, true) == 1 then
|
||||||
local dir_pos = #HOME + 1
|
local dir_pos = #HOME + 1
|
||||||
if string.find(text, PATHSEP, dir_pos, true) == dir_pos then
|
-- ensure we don't replace if the text is just "$HOME" or "$HOME/" so
|
||||||
|
-- it must have a "/" following the $HOME and some characters following.
|
||||||
|
if string.find(text, PATHSEP, dir_pos, true) == dir_pos and #text > dir_pos then
|
||||||
return "~" .. text:sub(dir_pos)
|
return "~" .. text:sub(dir_pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1025,7 +1025,8 @@ end
|
||||||
|
|
||||||
core.add_save_hook(function(filename)
|
core.add_save_hook(function(filename)
|
||||||
local doc = core.active_view.doc
|
local doc = core.active_view.doc
|
||||||
if doc and doc:is(Doc) and doc.abs_filename == USERDIR .. PATHSEP .. "init.lua" then
|
local user_filename = system.absolute_path(USERDIR .. PATHSEP .. "init.lua")
|
||||||
|
if doc and doc:is(Doc) and doc.abs_filename == user_filename then
|
||||||
core.reload_module("core.style")
|
core.reload_module("core.style")
|
||||||
core.load_user_directory()
|
core.load_user_directory()
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,9 +15,12 @@
|
||||||
<key>NSHighResolutionCapable</key>
|
<key>NSHighResolutionCapable</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>MinimumOSVersion</key><string>10.13</string>
|
<key>MinimumOSVersion</key><string>10.13</string>
|
||||||
|
<key>NSDocumentsFolderUsageDescription</key><string>To access, edit and index your projects.</string>
|
||||||
|
<key>NSDesktopFolderUsageDescription</key><string>To access, edit and index your projects.</string>
|
||||||
|
<key>NSDownloadsFolderUsageDescription</key><string>To access, edit and index your projects.</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.16.5</string>
|
<string>1.16.10</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>© 2019-2021 rxi franko</string>
|
<string>© 2019-2021 Francesco Abbate</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
Loading…
Reference in New Issue