fixed a couple of small bugs...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2015-12-10 03:46:11 +03:00
parent 0a30e253c5
commit 6831bfcddb
2 changed files with 20 additions and 12 deletions

View File

@ -105,6 +105,7 @@ module.GLOBAL_KEYBOARD = {
H: { H: {
default: 'flipHorizontal', default: 'flipHorizontal',
ctrl: 'listURLHistory', ctrl: 'listURLHistory',
alt: 'browseActions: "/History/"',
}, },
V: 'flipVertical', V: 'flipVertical',
P: { P: {

View File

@ -263,18 +263,19 @@ actions.Actions({
// NOTE: for complete isolation it is best to completely copy the // NOTE: for complete isolation it is best to completely copy the
// .config... // .config...
clone: [function(full){ clone: ['File/',
var res = actions.MetaActions.clone.call(this, full) function(full){
var res = actions.MetaActions.clone.call(this, full)
if(this.data){ if(this.data){
res.data = this.data.clone() res.data = this.data.clone()
} }
if(this.images){ if(this.images){
res.images = this.images.clone() res.images = this.images.clone()
} }
return res return res
}], }],
// XXX should this be here??? // XXX should this be here???
// XXX should this use .load(..) // XXX should this use .load(..)
@ -4182,6 +4183,12 @@ var URLHistoryUIActions = actions.Actions({
}) })
to_remove = [] to_remove = []
} }
var makeRE = function(path){
return RegExp('^'
// quote regular expression chars...
+p.replace(/([\.\\\/\(\)\[\]\$\*\+\-\{\}\@\^\&\?\<\>])/g, '\\$1')
+'$')
}
var o = overlay.Overlay(this.ribbons.viewer, var o = overlay.Overlay(this.ribbons.viewer,
browse.makeList( browse.makeList(
@ -4194,7 +4201,7 @@ var URLHistoryUIActions = actions.Actions({
['&diams;', ['&diams;',
function(p){ function(p){
var top = this.filter().first() var top = this.filter().first()
var cur = this.filter(p) var cur = this.filter(makeRE(p))
if(!top.is(cur)){ if(!top.is(cur)){
top.before(cur) top.before(cur)
@ -4204,7 +4211,7 @@ var URLHistoryUIActions = actions.Actions({
// mark for removal... // mark for removal...
['&times;', ['&times;',
function(p){ function(p){
var e = this.filter(p) var e = this.filter(makeRE(p))
.toggleClass('strike-out') .toggleClass('strike-out')
if(e.hasClass('strike-out')){ if(e.hasClass('strike-out')){