kamalchopra / jsyntaxpane

Automatically exported from code.google.com/p/jsyntaxpane
0 stars 0 forks source link

Lines are indented with a \t character instead of spaces #138

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Select a lines of text
2. Press the tab key
3. Lines are indented with a \t character instead of spaces

What is the expected output? What do you see instead?
I would expect spaces to be inserted using the value of 
ActionUtils.getTabSize(target).  This is the way the tab key works when lines 
are not selected.

What version of the product are you using? On what operating system?
Tip revision

Original issue reported on code.google.com by wadezieg...@gmail.com on 4 Mar 2010 at 7:22

GoogleCodeExporter commented 9 years ago
That should e a simple fix:
In the IndentAction class at around lines 79:
[[[
                        for (String line : lines) {
                                sb.append('\t');
                                sb.append(line);
                                sb.append('\n');
                        }
                        target.replaceSelection(sb.toString());
]]]
You'll need to replace the first append with append of the proper spaces.  I 
think 
there should be a method for that already.  Just didn't touch that code for 
ages now.

Wanna help in this?

Original comment by ayman.al...@gmail.com on 1 Apr 2010 at 4:59

GoogleCodeExporter commented 9 years ago
This will be committed soon.

Original comment by ayman.al...@gmail.com on 19 Apr 2010 at 10:46

GoogleCodeExporter commented 9 years ago
committed r125

Original comment by ayman.al...@gmail.com on 19 Apr 2010 at 10:48