From fa3165bd2c43ba65442a8366713fb702ab0a94d7 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Thu, 27 Nov 2014 15:33:14 +0100 Subject: [PATCH] procinput widget, input text supports symstrings --- lazproj/test/src/runnable_console.d | 4 ++-- src/ce_procinput.pas | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lazproj/test/src/runnable_console.d b/lazproj/test/src/runnable_console.d index fa241790..61875b2d 100644 --- a/lazproj/test/src/runnable_console.d +++ b/lazproj/test/src/runnable_console.d @@ -16,8 +16,8 @@ void main(string args[]) // version(Windows) string prgname = "cmd"; - else - version(linux) string prgname = "xterm"; + /*else + version(linux) string prgname = "xterm";*/ else assert(0, "unsupported target"); // diff --git a/src/ce_procinput.pas b/src/ce_procinput.pas index f6381e0e..a13e0369 100644 --- a/src/ce_procinput.pas +++ b/src/ce_procinput.pas @@ -6,7 +6,7 @@ interface uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, - Menus, StdCtrls, ce_widget, process, ce_common; + Menus, StdCtrls, ce_widget, process; type @@ -28,6 +28,9 @@ type implementation {$R *.lfm} +uses + ce_common, ce_symstring; + procedure TCEProcInputWidget.setProc(const aValue: TProcess); begin txtExeName.Caption := 'no process'; @@ -44,7 +47,10 @@ procedure TCEProcInputWidget.sendInput; var inp: string; begin - inp := txtInp.Text + lineEnding; + if txtInp.Text <> '' then + inp := symbolExpander.get(txtInp.Text) + lineEnding + else + inp := txtInp.Text + lineEnding; fProc.Input.Write(inp[1], length(inp)); txtInp.Text := ''; end;