[Konsole-devel] Fwd: copying tab characters under konsole

Arkadiusz Miskiewicz arekm at maven.pl
Sun Aug 3 01:58:38 UTC 2008


On Sunday 03 August 2008, Arkadiusz Miskiewicz wrote:
> >
> > 1.  Make sure that the terminal (see Pty::start() ) is setup so that
> > it doesn't do space -> tab conversion.
>
> Can this be done? kernel driver/char/n_tty.c always replaces \t with spaces
> (well, depends on  OPOST flag but I don't see any flags setting in konsole
> code)

void TEPty::disableOPost(void)
{
  struct termios tios;
  int fd = pty()->slaveFd();

  if(tcgetattr(fd, &tios))
  {
    qWarning("Uh oh.. can't get terminal attributes..");
    return;
  }
  tios.c_oflag &= ~XTABS;
  if(tcsetattr(fd, TCSANOW, &tios))
    qWarning("Uh oh.. can't set terminal attributes..");
}

and called that in TESession::run(). 

Unfortunately mouse still copies spaces not tabs :/

Still trying...
-- 
Arkadiusz Miśkiewicz        PLD/Linux Team
arekm / maven.pl            http://ftp.pld-linux.org/



More information about the konsole-devel mailing list