Skip to content
Commit 3dad0d62 authored by Kurt Hindenburg's avatar Kurt Hindenburg
Browse files

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
parent d77b991f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment