Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/autoedit
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22203/src/org/python/pydev/editor/autoedit
Modified Files:
PyAutoIndentStrategy.java
Log Message:
Auto-indent prefs fixed
(https://sourceforge.net/tracker/?func=detail&atid=577329&aid=2064164&group_id=85796)
Index: PyAutoIndentStrategy.java
===================================================================
RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/autoedit/PyAutoIndentStrategy.java,v
retrieving revision 1.71
retrieving revision 1.72
diff -C2 -d -r1.71 -r1.72
*** PyAutoIndentStrategy.java 9 Jul 2008 19:11:00 -0000 1.71
--- PyAutoIndentStrategy.java 21 Aug 2008 18:25:18 -0000 1.72
***************
*** 576,583 ****
*/
private void applyDefaultForTab(DocumentCommand command, int lineContentsToCursorLen) {
! int tabWidth = getIndentPrefs().getTabWidth();
- int mod = (lineContentsToCursorLen+tabWidth) % tabWidth;
- command.text = DocUtils.createSpaceString(tabWidth-mod);
}
--- 576,589 ----
*/
private void applyDefaultForTab(DocumentCommand command, int lineContentsToCursorLen) {
! IIndentPrefs prefs = getIndentPrefs();
! if(prefs.getUseSpaces()){
! int tabWidth = getIndentPrefs().getTabWidth();
!
! int mod = (lineContentsToCursorLen+tabWidth) % tabWidth;
! command.text = DocUtils.createSpaceString(tabWidth-mod);
! }else{
! //do nothing (a tab is already a tab)
! }
}
|