BS時に頭1文字をbufに復帰させるよう修正。不安定かも。
1 parent 15355a2 commit 7aab3e26709502ac34e971e8c104f705b9124f54
@tamra tamra authored on 24 Apr 2005
Showing 1 changed file
View
9
honoka/src/romkan.cpp
text = text.substr(0,pos - 1) + text.substr(pos);
pos --;
// BSは小バッファもBSするゾ。
if (buf.length()) buf = buf.substr(0,buf.length() - 1);
// BS時にバッファの頭1文字を復帰。
// その一文字がシングルバイトでなかった場合は破棄。
if (pos && (!removeRemainder)) {
String s = utf8_wcstombs(text.substr(pos - (buf.length() + 1),1));
if (s.length() == 1) {
buf = s + buf;
eval();
}
}
}