Do not permit deletion beyond the new line or the gdb prompt

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39710 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Riccardo Mottola 2016-05-02 22:39:25 +00:00
parent 1efa2a8783
commit 18d49572ee
2 changed files with 11 additions and 0 deletions

View file

@ -4,6 +4,9 @@
* Modules/Debuggers/ProjectCenter/PCDebugger.m
Refactor path to executablePath.
* Modules/Debuggers/ProjectCenter/PipeDelegate.m
Do not permit deletion beyond the new line or the gdb prompt.
2016-03-23 Riccardo Mottola <rm@gnu.org>
* Modules/Debuggers/ProjectCenter/PCDebugger.m

View file

@ -400,6 +400,14 @@
{
[self typeString: @"\n"];
}
else if (c == 127) // del (usually backspace)
{
NSString *tss = [[tView textStorage] string];
if (![tss hasSuffix:@"\n"] && ![tss hasSuffix:@"(gdb) "])
{
[self typeString: chars];
}
}
else
{
[self typeString: chars];