mirror of https://github.com/gorhill/uBlock.git
fix #3611
This commit is contained in:
parent
4c54cbf73a
commit
7d110250f3
|
@ -105,3 +105,7 @@ body[dir="rtl"] #commitButton:before {
|
|||
#diff.editing .CodeMirror-merge-editor .CodeMirror {
|
||||
background-color: #ffe;
|
||||
}
|
||||
body[dir="rtl"] .CodeMirror-merge-pane-rightmost {
|
||||
right: unset;
|
||||
left: 0px;
|
||||
}
|
||||
|
|
|
@ -139,6 +139,13 @@ mergeView.options.revertChunk = function(
|
|||
from, fromStart, fromEnd,
|
||||
to, toStart, toEnd
|
||||
) {
|
||||
// https://github.com/gorhill/uBlock/issues/3611
|
||||
if ( document.body.getAttribute('dir') === 'rtl' ) {
|
||||
var tmp;
|
||||
tmp = from; from = to; to = tmp;
|
||||
tmp = fromStart; fromStart = toStart; toStart = tmp;
|
||||
tmp = fromEnd; fromEnd = toEnd; toEnd = tmp;
|
||||
}
|
||||
if ( typeof fromStart.ch !== 'number' ) { fromStart.ch = 0; }
|
||||
if ( fromEnd.ch !== 0 ) { fromEnd.line += 1; }
|
||||
var toAdd = from.getRange(
|
||||
|
|
Loading…
Reference in New Issue