mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
CTRL+backspace now jumps to prev sel tab
This commit is contained in:
@@ -42,6 +42,7 @@ var ICEcoder = {
|
||||
tabFGopenFile: '#000', // FG of open file
|
||||
tabFGnormalFile: '#eee', // FG of normal file
|
||||
tabFGnormalTab: '#888', // FG of normal tab
|
||||
prevTab: 0, // Previous tab to current
|
||||
serverQueueItems: [], // Array of URLs to call in order
|
||||
miniMapBoxTop: 0, // Top of the minimap box highlighter
|
||||
miniMapBoxHeight: 0, // Height of the minimap box highlighter
|
||||
@@ -3755,6 +3756,11 @@ var ICEcoder = {
|
||||
switchTab: function(newTab,noFocus) {
|
||||
var cM, cMdiff, thisCM;
|
||||
|
||||
// If we're not switching to same tab (for some reason), note the previous tab
|
||||
if (newTab !== top.ICEcoder.selectedTab) {
|
||||
top.ICEcoder.prevTab = top.ICEcoder.selectedTab;
|
||||
}
|
||||
|
||||
// Identify tab that's currently selected & get the instance
|
||||
ICEcoder.selectedTab = newTab;
|
||||
cM = ICEcoder.getcMInstance();
|
||||
@@ -4373,12 +4379,19 @@ var ICEcoder = {
|
||||
top.ICEcoder.searchForSelected();
|
||||
return false;
|
||||
|
||||
// CTRL/Cmd+right arrow (Next tab)
|
||||
// CTRL/Cmd+backspace arrow (Go to previous tab selected)
|
||||
} else if(key==8 && (evt.ctrlKey||top.ICEcoder.cmdKey)) {
|
||||
if (top.ICEcoder.prevTab !== 0) {
|
||||
top.ICEcoder.switchTab(top.ICEcoder.prevTab);
|
||||
}
|
||||
return false;
|
||||
|
||||
// CTRL/Cmd+right arrow (Tab to right)
|
||||
} else if(key==39 && (evt.ctrlKey||top.ICEcoder.cmdKey) && area!="content") {
|
||||
top.ICEcoder.nextTab();
|
||||
return false;
|
||||
|
||||
// CTRL/Cmd+left arrow (Previous tab)
|
||||
// CTRL/Cmd+left arrow (Tab to left)
|
||||
} else if(key==37 && (evt.ctrlKey||top.ICEcoder.cmdKey) && area!="content") {
|
||||
top.ICEcoder.previousTab();
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user