Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug in echotc ?



> Because atoi(*argv) is "the number of lines affected".  Except it isn't,
> quite, because really the number of lines affected is the difference
> between the current line and the target line.  So maybe 1 is the right
> value to use for the second argument of tputs() after all.  Except if

My thought was based on the assumption that affcnt is used only for
delay padding.

> this isn't a "cm" but rather a relative line-motion such as "DO" or "UP"
> then ... maybe what we want is
> 
> 	num = atoi(*argv);
> 	if (argct == 1)
> 	    tputs(tgoto(t, num, num), num, putraw);
>         else
>             tputs(tgoto(t, atoi(argv[1]), num), 1, putraw);
> 
> Except it's not clear *that* does the right thing with "LE" or "RI".
> Gag.

I think that there's probably a reason everyone says to use terminfo instead.



Messages sorted by: Reverse Date, Date, Thread, Author