mirror of
https://github.com/paradoxxxzero/butterfly.git
synced 2026-05-26 15:13:36 +00:00
Hardle diacritical marks
This commit is contained in:
2
butterfly/static/ext.min.js
vendored
2
butterfly/static/ext.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -761,7 +761,7 @@
|
||||
};
|
||||
|
||||
Terminal.prototype.write = function(data) {
|
||||
var attr, b64, c, ch, content, cs, i, k, l, len, line, m, mime, num, pt, ref, ref1, ref2, ref3, safe, type, valid;
|
||||
var attr, b64, c, ch, content, cs, i, k, l, len, line, m, mime, num, pt, ref, ref1, ref2, ref3, safe, type, valid, x, y;
|
||||
i = 0;
|
||||
l = data.length;
|
||||
while (i < l) {
|
||||
@@ -802,6 +802,20 @@
|
||||
this.state = State.escaped;
|
||||
break;
|
||||
default:
|
||||
if (("\u0300" <= ch && ch <= "\u036F") || ("\u1AB0" <= ch && ch <= "\u1AFF") || ("\u1DC0" <= ch && ch <= "\u1DFF") || ("\u20D0" <= ch && ch <= "\u20FF") || ("\uFE20" <= ch && ch <= "\uFE2F")) {
|
||||
x = this.x;
|
||||
y = this.y + this.shift;
|
||||
if (this.x > 0) {
|
||||
x -= 1;
|
||||
} else if (this.y > 0) {
|
||||
y -= 1;
|
||||
x = this.cols - 1;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
this.screen[y].chars[x].ch += ch;
|
||||
break;
|
||||
}
|
||||
if (ch >= " ") {
|
||||
if ((ref = this.charset) != null ? ref[ch] : void 0) {
|
||||
ch = this.charset[ch];
|
||||
|
||||
6
butterfly/static/main.min.js
vendored
6
butterfly/static/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -630,7 +630,26 @@ class Terminal
|
||||
@state = State.escaped
|
||||
|
||||
else
|
||||
# ' '
|
||||
# Diacritical Marks
|
||||
if ("\u0300" <= ch <= "\u036F" or
|
||||
"\u1AB0" <= ch <= "\u1AFF" or
|
||||
"\u1DC0" <= ch <= "\u1DFF" or
|
||||
"\u20D0" <= ch <= "\u20FF" or
|
||||
"\uFE20" <= ch <= "\uFE2F")
|
||||
|
||||
x = @x
|
||||
y = @y + @shift
|
||||
if @x > 0
|
||||
x -= 1
|
||||
else if @y > 0
|
||||
y -= 1
|
||||
x = @cols - 1
|
||||
else
|
||||
# ?!
|
||||
break
|
||||
@screen[y].chars[x].ch += ch
|
||||
break
|
||||
|
||||
if ch >= " "
|
||||
ch = @charset[ch] if @charset?[ch]
|
||||
if @x >= @cols
|
||||
|
||||
Reference in New Issue
Block a user