Ignore default null eol in Session::sendTextToTerminal

Authored by hindenburg on Sep 26 2018, 2:58 AM.

Description

Ignore default null eol in Session::sendTextToTerminal

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.

Reviewers: Konsole, hindenburg

Reviewed By: Konsole, hindenburg

Subscribers: hindenburg, konsole-devel

Tags: Konsole

Differential Revision: https://phabricator.kde.org/D15732

Details

Committed
hindenburgSep 27 2018, 1:54 AM
Reviewer
Konsole
Differential Revision
D15732: Ignore default null eol in Session::sendTextToTerminal
Parents
R319:d77b991f3a6c: Revert "Refactor Profile and ColorScheme"
Branches
Unknown
Tags
Unknown