aboutsummaryrefslogtreecommitdiff
path: root/core/ext
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2010-03-10 12:54:18 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2010-03-10 12:54:18 -0500
commit87e5433dd9e4e054147c7b234b9d80a6c9e0db7d (patch)
tree82100784be5d0e6b3fda2143f936049b7eb2ede3 /core/ext
parent2d4c5b2cd9e7720d479b9d4ba1db805dad8b97bf (diff)
downloadtextadept-87e5433dd9e4e054147c7b234b9d80a6c9e0db7d.tar.gz
textadept-87e5433dd9e4e054147c7b234b9d80a6c9e0db7d.zip
Added textadept.buffer_switch() to replace side pane's buffer browser.
Diffstat (limited to 'core/ext')
-rw-r--r--core/ext/key_commands.lua6
-rw-r--r--core/ext/menu.lua3
2 files changed, 7 insertions, 2 deletions
diff --git a/core/ext/key_commands.lua b/core/ext/key_commands.lua
index 6181d378..98d32490 100644
--- a/core/ext/key_commands.lua
+++ b/core/ext/key_commands.lua
@@ -114,7 +114,7 @@ if not MAC then
-- Windows and Linux key commands.
--[[
- C: B D H I J K L M U
+ C: D H I J K L M U
A: A B C D E F G H J K L M N P R S T U V W X Y Z
CS: A B C D G H I J K L M N O Q T U V X Y Z
SA: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
@@ -214,6 +214,7 @@ if not MAC then
keys.ai = { m_snippets.show_style }
-- Buffers
+ keys.cb = { t.switch_buffer }
keys['c\t'] = { 'goto_buffer', v, 1, false }
keys['cs\t'] = { 'goto_buffer', v, -1, false }
local function toggle_setting(setting)
@@ -272,7 +273,7 @@ else
--[[
C: J L M U W X Z
- A: B D E H J K L U
+ 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
CA: A C E J K L M N O Q R S T U V W X Y Z
@@ -375,6 +376,7 @@ else
keys.ci = { m_snippets.show_style }
-- Buffers
+ keys.ab = { t.switch_buffer }
keys['c\t'] = { 'goto_buffer', v, 1, false }
keys['cs\t'] = { 'goto_buffer', v, -1, false }
local function toggle_setting(setting)
diff --git a/core/ext/menu.lua b/core/ext/menu.lua
index 0bb92a07..7d5649e5 100644
--- a/core/ext/menu.lua
+++ b/core/ext/menu.lua
@@ -115,6 +115,7 @@ local ID = {
ENCODING_MACROMAN = 515,
ENCODING_UTF16 = 516,
REFRESH_SYNTAX_HIGHLIGHTING = 508,
+ SWITCH_BUFFER = 517,
-- View
NEXT_VIEW = 601,
PREV_VIEW = 602,
@@ -243,6 +244,7 @@ local menubar = {
title = l.MENU_BUF_TITLE,
{ l.MENU_BUF_NEXT, ID.NEXT_BUFFER },
{ l.MENU_BUF_PREV, ID.PREV_BUFFER },
+ { l.MENU_BUF_SWITCH, ID.SWITCH_BUFFER },
{ SEPARATOR, ID.SEPARATOR },
{ l.MENU_BUF_TOGGLE_VIEW_EOL, ID.TOGGLE_VIEW_EOL },
{ l.MENU_BUF_TOGGLE_WRAP, ID.TOGGLE_WRAP_MODE },
@@ -476,6 +478,7 @@ local actions = {
[ID.ENCODING_MACROMAN] = { set_encoding, 'MacRoman' },
[ID.ENCODING_UTF16] = { set_encoding, 'UTF-16LE' },
[ID.REFRESH_SYNTAX_HIGHLIGHTING] = { 'colourise', b, 0, -1 },
+ [ID.SWITCH_BUFFER] = { t.switch_buffer },
-- View
[ID.NEXT_VIEW] = { t.goto_view, 1, false },
[ID.PREV_VIEW] = { t.goto_view, -1, false },