Ignore default null eol in Session::sendTextToTerminal
ClosedPublic

Authored by pavelkh on Sep 24 2018, 2:22 PM.

Details

Summary

Fixes a bug that currently affects Konsole KPart

Repro steps:

  • Create KPart, and start xxd in it.
  • Call konsolePart->sendInput("hello")
  • In the konsole, press Return, then Ctrl+D

Here's xxd output:
00000000: 6865 6c6c 6f00 0a hello..

The valid xxd output would be:
00000000: 6865 6c6c 6f0a hello.

Null bytes are mostly ignored, but some programs (e.g. ipython interpreter) really don't like them.

The bug happens, since konsole part uses activeSession()->sendTextToTerminal(text);, and sendTextToTerminal() eol parameter defaults to null character.

This diff makes sendTextToTerminal() ignore null eol character.

Diff Detail

Repository
R319 Konsole
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
pavelkh created this revision.Sep 24 2018, 2:22 PM
Restricted Application added a subscriber: konsole-devel. · View Herald TranscriptSep 24 2018, 2:22 PM
pavelkh requested review of this revision.Sep 24 2018, 2:22 PM
hindenburg accepted this revision.Sep 26 2018, 3:13 AM
hindenburg added a subscriber: hindenburg.

thanks

This revision is now accepted and ready to land.Sep 26 2018, 3:13 AM
This revision was automatically updated to reflect the committed changes.

@hindenberg I think you forgot to credit Pavel