Author: rmottola
Date: Thu Mar 17 12:09:21 2016
New Revision: 39555
URL: http://svn.gna.org/viewcvs/gnustep?rev=39555&view=rev
Log:
treat keyboard input special and log it
Modified:
apps/projectcenter/branches/ptyview_with_pipes/Modules/Debuggers/ProjectCenter/PTYView.m
Modified:
apps/projectcenter/branches/ptyview_with_pipes/Modules/Debuggers/ProjectCenter/PTYView.m
URL:
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/branches/ptyview_with_pipes/Modules/Debuggers/ProjectCenter/PTYView.m?rev=39555&r1=39554&r2=39555&view=diff
==============================================================================
---
apps/projectcenter/branches/ptyview_with_pipes/Modules/Debuggers/ProjectCenter/PTYView.m
(original)
+++
apps/projectcenter/branches/ptyview_with_pipes/Modules/Debuggers/ProjectCenter/PTYView.m
Thu Mar 17 12:09:21 2016
@@ -279,6 +279,13 @@
[stdinHandle synchronizeFile];
}
+/* for input as typed from the user, it needs to be shown too*/
+- (void) typeString: (NSString *)string
+{
+ [self putString:string];
+ [self logString:string newLine:NO];
+}
+
/**
* Put a single character into the stream.
*/
@@ -301,7 +308,10 @@
NSString *chars;
chars = [theEvent characters];
- if ([chars length] == 1)
+ if ([chars length] == 0)
+ {
+ }
+ else if ([chars length] == 1)
{
unichar c;
c = [chars characterAtIndex: 0];
@@ -314,11 +324,11 @@
}
if (c == 13) // CR
{
- [self putString: @"\n"];
+ [self typeString: @"\n"];
}
else
{
- [self putString: chars];
+ [self typeString: chars];
}
}
else
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs