guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help me find the bug in my terminal-based editor


From: Mike Gran
Subject: Re: Help me find the bug in my terminal-based editor
Date: Sun, 3 Feb 2019 13:22:15 -0800
User-agent: Mutt/1.10.1 (2018-07-13)

On Sun, Feb 03, 2019 at 02:07:00PM +0100, Amirouche Boubekki wrote:
> Hello,
> 
> 
> I have a strange bug in my terminal-based editor.
> The code can be found at https://framagit.org/a-guile-mind/zk
> 
> To install you will need guile-bytestructures and guile-pfds.
> 
> Then:
> 
>   git clone https://framagit.org/a-guile-mind/zk
>   cd zk
>   make dev
> 
> You will also need to change the following line:
> 
>   https://framagit.org/a-guile-mind/zk/blob/master/zk/termbox.scm#L174
> 
> Then you can type:
> 
>   make run
> 
> This will clear the terminal and display the content of 'zk.scm'.
> 
> If you type 'enter' key, it should add a newline at the start
> of the buffer. It does, but rendering has glitches. If you resize
> the window it will remove the glitches.

I did build and run your program, passing the output through teseq to
see which control codes it was writing out.  As far as I can tell, the
glitch you are seeing is in your code, and it not a mysterious
console bug.

Teseq tells me that after I hit carriage return, your program moves to
the top-left corner, does a line-feed (pushing everything down and
putting the cursor in line 2, column 1) prints some spaces over all
the characters in line 2, jumps to column 16, and then writes "ice-9
match)))"

It works after resizing because after resizing, you move to 1,1 and then
emit an "erase in page".

To use teseq, I typed "script" which starts a console session that gets
saved in the "typescript" file, and then I called "teseq typescript" on
the output.

Regards,
Mike Gran



reply via email to

[Prev in Thread] Current Thread [Next in Thread]