Bug 341319

Summary: Tab not working correctly
Product: [Mono] MonoDevelop Reporter: Anders Rune Jensen <anders>
Component: texteditorAssignee: Michael Hutchinson <mhutchinson>
Status: RESOLVED FIXED QA Contact: MD Bugs <monodevelop-bugs>
Severity: Normal    
Priority: P5 - None    
Version: 0.17 (Beta 2)   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Anders Rune Jensen 2007-11-13 14:15:17 UTC
The following is quite strange:

editor consists of some data:

public void foo()
{
    // do something
}

I want to reindent the line, so I mark the spaces before // do something and hit tab and I get this:

public void foo()
{
// do something
}

If I press tab again I now get the correct first indention. This is inconsistent, since if I use space instead of tab (using the first line as example) gives me:

public void foo()
{
 // do something
}
Comment 1 Michael Hutchinson 2007-11-14 01:28:47 UTC
Confirmed. This seems to be a nasty-hard-to-track-down bug, bringing up several other issues -- apparently in this situation the GtkSourceView's OnKeyPressEvent runs into a "Invalid text buffer iterator:" problem, which may explain why this character goes missing regardless of what else I do.
Comment 2 Michael Hutchinson 2007-11-14 02:03:05 UTC
It's definitely happening in GtkSourceView OnKeyPressEvent method, even when all of MD's other KeyPress handling is disabled. Perplexing.
Comment 3 Michael Hutchinson 2007-11-14 23:30:22 UTC
This is partially a symptom of bug #341762; workaround for this committed in r89637. Fully fixed in r89643.