mirror of
https://gitlab.com/c3d/db48x.git
synced 2024-09-29 05:36:58 +02:00
Fix problem of CHS on first character
When CHS is on first character of a negative number, should remove it. Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
This commit is contained in:
parent
b7aed578a1
commit
b5dd83a692
1 changed files with 3 additions and 2 deletions
|
@ -2475,7 +2475,7 @@ bool user_interface::handle_digits(int key)
|
|||
// Special case for change of sign
|
||||
byte *ed = rt.editor();
|
||||
byte *p = ed + cursor;
|
||||
unicode c = 0;
|
||||
unicode c = utf8_codepoint(p);
|
||||
unicode dm = Settings.decimal_mark;
|
||||
unicode ns = Settings.space;
|
||||
unicode hs = Settings.space_based;
|
||||
|
@ -2510,7 +2510,8 @@ bool user_interface::handle_digits(int key)
|
|||
else if (c == '-')
|
||||
{
|
||||
rt.remove(p - ed, 1);
|
||||
cursor--;
|
||||
if (cursor)
|
||||
cursor--;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue