aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/events.lua1
-rw-r--r--core/ext/key_commands.lua6
-rw-r--r--core/init.lua10
3 files changed, 7 insertions, 10 deletions
diff --git a/core/events.lua b/core/events.lua
index 3cc47e29..7deac1a2 100644
--- a/core/events.lua
+++ b/core/events.lua
@@ -337,7 +337,6 @@ add_handler('update_ui',
add_handler('margin_click',
function(margin, modifiers, position) -- toggles folding
- local buffer = buffer
local line = buffer:line_from_position(position)
buffer:toggle_fold(line)
end)
diff --git a/core/ext/key_commands.lua b/core/ext/key_commands.lua
index 7150be0c..162f97a9 100644
--- a/core/ext/key_commands.lua
+++ b/core/ext/key_commands.lua
@@ -210,7 +210,7 @@ if not MAC then
keys['f2'] = { t.command_entry.focus }
-- Run
local m_run = _m.textadept.run
- keys.cr = { m_run.run }
+ keys.cr = { m_run.run }
keys.cR = { m_run.compile }
-- Snippets
local m_snippets = _m.textadept.lsnippets
@@ -281,7 +281,7 @@ else
-- Mac OSX key commands
--[[
- C: J L M U W X Z
+ C: J M U W X Z
A: D E H J K L U
CS: C D G H I J K L M O Q S T U V W X Y Z
SA: A B C D H I J K L M N O Q R T U V X
@@ -355,7 +355,7 @@ else
}
-- Search
- keys.af = { t.find.focus } -- find/replace
+ keys.af = { t.find.focus } -- find/replace
keys.ag = { t.find.find_next }
keys.aG = { t.find.find_prev }
keys.ar = { t.find.replace }
diff --git a/core/init.lua b/core/init.lua
index f17ec196..25708169 100644
--- a/core/init.lua
+++ b/core/init.lua
@@ -15,16 +15,14 @@ _LEXERPATH = _USERHOME..'/lexers/?.lua;'.._HOME..'/lexers'
_THEME = 'light'
local f = io.open(_USERHOME..'/theme', 'rb')
if f then
- theme = f:read('*line'):match('[^\r\n]+')
+ local theme = f:read('*line'):match('[^\r\n]+')
f:close()
if theme and #theme > 0 then _THEME = theme end
end
-theme = _THEME
-if not theme:find('[/\\]') then
+if not _THEME:find('[/\\]') then
+ local theme = _THEME
_THEME = _HOME..'/themes/'..theme
- if not lfs.attributes(_THEME) then
- _THEME = _USERHOME..'/themes/'..theme
- end
+ if not lfs.attributes(_THEME) then _THEME = _USERHOME..'/themes/'..theme end
end
require 'iface'