This commit is contained in:
Raymond Hill 2018-03-16 18:33:50 -04:00
parent 4c54cbf73a
commit 7d110250f3
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 11 additions and 0 deletions

View File

@ -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;
}

View File

@ -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(