nadrad / h-m-m

Hackers Mind Map
GNU General Public License v3.0
1.89k stars 53 forks source link

Drawing bug when using it on macOS #13

Closed diegomichel closed 2 years ago

diegomichel commented 2 years ago

Hi,

This bug is present on MacOS, when using kitty with tmux, standalone kitty, or terminal app.

Screen Shot 2022-09-15 at 10 10 42
~/github/h-m-m (main ✗) php -v
PHP 8.1.10 (cli) (built: Sep  4 2022 08:41:25) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.10, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.10, Copyright (c), by Zend Technologies

shortcuts file content:

root
    Adding, editing or removing nodes
        o create new sibling
        O create new child
        y yanks active and descendants
        Y yanks descendants
        d deletes active node and descendants
        D deletes descendants
        p paste as descendants
        P paste as siblings
        ctrl-p appends the clipboard at the end of the active node title
        e edit current node
        E edits current node replacing content
    Relative navigating/moving
        h or left go back to parent
        l or right go to the middle child
        k or up upper sibling
        j or down lower sibling
        J move down
        K move up

I tried changing fonts to see if that was the issue, but the issue remains. Let me know if you want me to try different settings or terminal apps to figure this out; thanks!.

nadrad commented 2 years ago

I think that was the remaining BOM bytes from the multi byte characters that have remained in your file. (when you replaced the down arrow symbol with the word 'down', the symbol was removed but not the BOM bytes). It makes it think the line is longer than it really is.

Now the code removes all the BOM bytes. I think it should solve this and similar problems.