D15732: Ignore default null eol in Session::sendTextToTerminal

Pavel Khlebovich noreply at phabricator.kde.org
Mon Sep 24 15:22:37 BST 2018


pavelkh created this revision.
pavelkh added a project: Konsole.
Herald added a subscriber: konsole-devel.
pavelkh requested review of this revision.

REVISION 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.

REPOSITORY
  R319 Konsole

REVISION DETAIL
  https://phabricator.kde.org/D15732

AFFECTED FILES
  src/Session.cpp

To: pavelkh
Cc: konsole-devel, herrold, ngraham, maximilianocuria, hindenburg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20180924/61ac7738/attachment.html>


More information about the konsole-devel mailing list