From: <ez...@us...> - 2009-06-25 04:53:37
|
Revision: 15572 http://jedit.svn.sourceforge.net/jedit/?rev=15572&view=rev Author: ezust Date: 2009-06-25 04:53:36 +0000 (Thu, 25 Jun 2009) Log Message: ----------- Fixed toString() so it looks like the base class version but shows the extra properties too. Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2009-06-25 00:57:50 UTC (rev 15571) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2009-06-25 04:53:36 UTC (rev 15572) @@ -209,18 +209,22 @@ public String toString() { StringBuilder builder = new StringBuilder(); - builder.append("caret: ").append(caret).append('\n'); - builder.append("caretLine: ").append(caretLine).append('\n'); - builder.append("caretScreenLine: ").append(caretScreenLine).append('\n'); - builder.append("electricScroll: ").append(electricScroll).append('\n'); - builder.append("horizontalOffset: ").append(horizontalOffset).append('\n'); - builder.append("magicCaret: ").append(magicCaret).append('\n'); - builder.append("offsetXY").append(offsetXY.toString()).append('\n'); - builder.append("oldCaretLine: ").append(oldCaretLine).append('\n'); - builder.append("screenLastLine: ").append(screenLastLine).append('\n'); - builder.append("visibleLines: ").append(visibleLines).append('\n'); - builder.append("firstPhysicalLine: ").append(getFirstPhysicalLine()).append('\n'); - builder.append("physLastLine: ").append(physLastLine).append('\n'); + String baseVersion = super.toString(); + int len = baseVersion.length() - 1; + builder.append(baseVersion); + builder.setLength(len); // chop off the last ] + builder.append(",caret=").append(caret).append(','); + builder.append("caretLine=").append(caretLine).append(','); + builder.append("caretScreenLine=").append(caretScreenLine).append(','); + builder.append("electricScroll=").append(electricScroll).append(','); + builder.append("horizontalOffset=").append(horizontalOffset).append(','); + builder.append("magicCaret=").append(magicCaret).append(','); + builder.append("offsetXY=").append(offsetXY.toString()).append(','); + builder.append("oldCaretLine=").append(oldCaretLine).append(','); + builder.append("screenLastLine=").append(screenLastLine).append(','); + builder.append("visibleLines=").append(visibleLines).append(','); + builder.append("firstPhysicalLine=").append(getFirstPhysicalLine()).append(','); + builder.append("physLastLine=").append(physLastLine).append(']'); return builder.toString(); } //}}} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ez...@us...> - 2009-06-25 06:54:38
|
Revision: 15569 http://jedit.svn.sourceforge.net/jedit/?rev=15569&view=rev Author: ezust Date: 2009-06-25 00:40:57 +0000 (Thu, 25 Jun 2009) Log Message: ----------- Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2009-06-25 00:39:23 UTC (rev 15568) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2009-06-25 00:40:57 UTC (rev 15569) @@ -56,7 +56,7 @@ * The concrete instance used by jEdit itself is called the JEditTextArea. * * This class uses a minimal set of jEdit APIs because it is the base class of the - * JEditEmbeddedTextArea also and needs to be embeddable. + * JEditEmbeddedTextArea and StandaloneTextArea, so it needs to be embeddable and separable. * * @author Slava Pestov * @author John Gellene (API documentation) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sh...@us...> - 2010-10-21 07:07:37
|
Revision: 18806 http://jedit.svn.sourceforge.net/jedit/?rev=18806&view=rev Author: shlomy Date: 2010-10-21 07:07:31 +0000 (Thu, 21 Oct 2010) Log Message: ----------- Applied patch #3091530 - Elastic tabstops fix - by Anshal Shukla. Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2010-10-20 23:35:47 UTC (rev 18805) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2010-10-21 07:07:31 UTC (rev 18806) @@ -4756,6 +4756,10 @@ buffer.getColumnBlock().setTabSizeDirtyStatus(true, true); } } + else + { + buffer.elasticTabstopsOn = false; + } int _tabSize = buffer.getTabSize(); char[] foo = new char[_tabSize]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kp...@us...> - 2011-02-06 23:28:49
|
Revision: 19348 http://jedit.svn.sourceforge.net/jedit/?rev=19348&view=rev Author: kpouer Date: 2011-02-06 23:28:43 +0000 (Sun, 06 Feb 2011) Log Message: ----------- added a few javadoc Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2011-02-06 19:39:52 UTC (rev 19347) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2011-02-06 23:28:43 UTC (rev 19348) @@ -3914,6 +3914,7 @@ /** * Like {@link DisplayManager#collapseFold(int)}, but * also moves the caret to the first line of the fold. + * @param line the physical line index of the fold that we want to collapse * @since jEdit 4.3pre7 */ public void collapseFold(int line) @@ -3930,7 +3931,7 @@ if(!multi) { - // cannot use selectNone() beacause the finishCaretUpdate method will reopen the fold + // cannot use selectNone() because the finishCaretUpdate method will reopen the fold invalidateSelectedLines(); selectionManager.setSelection((Selection) null); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kp...@us...> - 2011-02-26 10:52:32
|
Revision: 19403 http://jedit.svn.sourceforge.net/jedit/?rev=19403&view=rev Author: kpouer Date: 2011-02-26 10:52:25 +0000 (Sat, 26 Feb 2011) Log Message: ----------- Removed unnecessary calls to painter.getFontMetrics() Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2011-02-25 12:29:10 UTC (rev 19402) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2011-02-26 10:52:25 UTC (rev 19403) @@ -977,7 +977,6 @@ */ public int xyToOffset(int x, int y, boolean round) { - FontMetrics fm = painter.getFontMetrics(); int height = painter.getLineHeight(); int line = y / height; @@ -1065,8 +1064,6 @@ if(screenLine == -1) return null; - FontMetrics fm = painter.getFontMetrics(); - retVal.y = screenLine * painter.getLineHeight(); ChunkCache.LineInfo info = chunkCache.getLineInfo(screenLine); @@ -1103,7 +1100,6 @@ if(chunkCache.needFullRepaint()) end = visibleLines; - FontMetrics fm = painter.getFontMetrics(); int y = start * painter.getLineHeight(); int height = (end - start + 1) * painter.getLineHeight(); painter.repaint(0,y,painter.getWidth(),height); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kp...@us...> - 2011-03-22 13:59:02
|
Revision: 19478 http://jedit.svn.sourceforge.net/jedit/?rev=19478&view=rev Author: kpouer Date: 2011-03-22 13:58:56 +0000 (Tue, 22 Mar 2011) Log Message: ----------- minor changes Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2011-03-22 12:25:14 UTC (rev 19477) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2011-03-22 13:58:56 UTC (rev 19478) @@ -24,7 +24,6 @@ package org.gjt.sp.jedit.textarea; //{{{ Imports - import java.util.EventObject; import java.util.Iterator; import java.util.LinkedList; @@ -744,7 +743,7 @@ // it was not possible to see the second (or next) // subregion of a line ChunkCache.LineInfo[] infos = chunkCache - .getLineInfosForPhysicalLine(line); + .getLineInfosForPhysicalLine(line); int subregion = ChunkCache.getSubregionOfOffset( offset,infos); setFirstPhysicalLine(line,subregion); @@ -4016,7 +4015,7 @@ getToolkit().beep(); return; } - if(!buffer.getStringProperty("folding").equals("explicit")) + if(!"explicit".equals(buffer.getStringProperty("folding"))) { throw new TextAreaException("folding-not-explicit"); } @@ -4774,8 +4773,8 @@ String oldWrap = wrap; wrap = buffer.getStringProperty("wrap"); - hardWrap = wrap.equals("hard"); - softWrap = wrap.equals("soft"); + hardWrap = "hard".equals(wrap); + softWrap = "soft".equals(wrap); boolean oldWrapToWidth = wrapToWidth; int oldWrapMargin = wrapMargin; setMaxLineLength(buffer.getIntegerProperty("maxLineLen",0)); @@ -4993,6 +4992,7 @@ Runnable runnable = new Runnable() { + @Override public void run() { vertical.setValues(firstLine,visible,0,lineCount); @@ -5136,7 +5136,7 @@ private final MutableCaretEvent caretEvent; private boolean caretBlinks; - private ElasticTabstopsTabExpander elasticTabstopsExpander = new ElasticTabstopsTabExpander(this); + private final ElasticTabstopsTabExpander elasticTabstopsExpander = new ElasticTabstopsTabExpander(this); protected InputHandlerProvider inputHandlerProvider; private InputMethodSupport inputMethodSupport; @@ -5746,9 +5746,8 @@ if(getSelectionCount() != 0) { Selection[] selections = getSelection(); - for(int i = 0; i < selections.length; i++) + for (Selection s : selections) { - Selection s = selections[i]; if(s instanceof Selection.Rect) { Selection.Rect r = (Selection.Rect)s; @@ -6235,6 +6234,7 @@ private static class CaretBlinker implements ActionListener { //{{{ actionPerformed() method + @Override public void actionPerformed(ActionEvent evt) { if(focusedComponent != null && focusedComponent.hasFocus()) @@ -6270,6 +6270,7 @@ private class AdjustHandler implements AdjustmentListener { //{{{ adjustmentValueChanged() method + @Override public void adjustmentValueChanged(AdjustmentEvent evt) { if(!scrollBarsInitialized) @@ -6286,6 +6287,7 @@ private class FocusHandler implements FocusListener { //{{{ focusGained() method + @Override public void focusGained(FocusEvent evt) { if(bufferChanging) @@ -6305,6 +6307,7 @@ } //}}} //{{{ focusLost() method + @Override public void focusLost(FocusEvent evt) { if(!isShowing()) @@ -6325,6 +6328,7 @@ //{{{ MouseWheelHandler class private class MouseWheelHandler implements MouseWheelListener { + @Override public void mouseWheelMoved(MouseWheelEvent e) { /**************************************************** @@ -6414,6 +6418,7 @@ structureTimer = new Timer(100,new ActionListener() { + @Override public void actionPerformed(ActionEvent evt) { if(focusedComponent != null) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kp...@us...> - 2011-03-22 13:59:47
|
Revision: 19479 http://jedit.svn.sourceforge.net/jedit/?rev=19479&view=rev Author: kpouer Date: 2011-03-22 13:59:41 +0000 (Tue, 22 Mar 2011) Log Message: ----------- Fixed explicit fold Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2011-03-22 13:58:56 UTC (rev 19478) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2011-03-22 13:59:41 UTC (rev 19479) @@ -56,6 +56,7 @@ import org.gjt.sp.util.Log; import org.gjt.sp.util.StandardUtilities; import org.gjt.sp.util.ThreadUtilities; +//}}} /** Abstract TextArea component. * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kp...@us...> - 2011-08-28 09:06:14
|
Revision: 19845 http://jedit.svn.sourceforge.net/jedit/?rev=19845&view=rev Author: kpouer Date: 2011-08-28 09:06:08 +0000 (Sun, 28 Aug 2011) Log Message: ----------- removed unnecessary todo and minor simplification Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2011-08-27 09:44:25 UTC (rev 19844) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2011-08-28 09:06:08 UTC (rev 19845) @@ -3018,13 +3018,12 @@ */ public void smartEnd(boolean select) { - int pos = getCaretPosition(); - int npos = 0; switch(getInputHandler().getLastActionCount()) { case 1: + int pos = getCaretPosition(); goToEndOfCode(select); - npos = getCaretPosition(); + int npos = getCaretPosition(); if (npos == pos) goToEndOfWhiteSpace(select); break; case 2: @@ -3089,7 +3088,6 @@ { int line = getCaretLine(); - // @todo - Should tokenHandler be an TextArea instance variable? DefaultTokenHandler tokenHandler = new DefaultTokenHandler(); buffer.markTokens(line,tokenHandler); Token token = tokenHandler.getTokens(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sh...@us...> - 2013-09-29 18:42:48
|
Revision: 23218 http://jedit.svn.sourceforge.net/jedit/?rev=23218&view=rev Author: shlomy Date: 2013-09-29 18:42:42 +0000 (Sun, 29 Sep 2013) Log Message: ----------- Get rid of a false check that the buffer is editable before turning on elastic tabstops. This check existed in the initial implementation of the elastic tabstops, when the feature actually modified the buffer, but it no longer does that. Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2013-09-29 16:23:07 UTC (rev 23217) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2013-09-29 18:42:42 UTC (rev 23218) @@ -4534,13 +4534,10 @@ */ public void turnOnElasticTabstops() { - if(!buffer.isEditable()) - getToolkit().beep(); - else - { - buffer.indentUsingElasticTabstops(); - buffer.elasticTabstopsOn = true; - } + if(buffer.isLoading()) + return; + buffer.indentUsingElasticTabstops(); + buffer.elasticTabstopsOn = true; } //}}} //{{{ shiftIndentLeft() method This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sh...@us...> - 2013-11-26 20:17:12
|
Revision: 23349 http://jedit.svn.sourceforge.net/jedit/?rev=23349&view=rev Author: shlomy Date: 2013-11-26 20:17:05 +0000 (Tue, 26 Nov 2013) Log Message: ----------- Committed patch #3607873 by Marc H?\195?\164fner. Thanks Marc! This patch fixes cursor misplacement with auto-indent. Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2013-11-25 00:12:42 UTC (rev 23348) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2013-11-26 20:17:05 UTC (rev 23349) @@ -4446,6 +4446,12 @@ } //}}} //{{{ insertEnterAndIndent() method + /** + * Inserts a line break and indents the new line. Moves the caret to + * the first non-whitespace character of the new line. If the newline + * character is an electric key the current line will also be + * re-indented. + */ public void insertEnterAndIndent() { if(!isEditable()) @@ -4464,7 +4470,17 @@ setSelectedText("\n"); if ("full".equals(autoIndent)) - buffer.indentLine(caretLine, true); + { + if (!buffer.indentLine(caretLine, true)) { + // If the line was already correctly indented, the + // caret needs to be moved explicitly. + if (lineContainsSpaceAndTabs(caretLine)) { + goToEndOfLine(false); + } else { + goToStartOfWhiteSpace(false); + } + } + } else if ("simple".equals(autoIndent)) buffer.simpleIndentLine(caretLine); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kp...@us...> - 2013-12-02 10:11:40
|
Revision: 23365 http://jedit.svn.sourceforge.net/jedit/?rev=23365&view=rev Author: kpouer Date: 2013-12-02 10:11:30 +0000 (Mon, 02 Dec 2013) Log Message: ----------- fixed coding style Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2013-11-30 18:01:28 UTC (rev 23364) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2013-12-02 10:11:30 UTC (rev 23365) @@ -4471,12 +4471,16 @@ if ("full".equals(autoIndent)) { - if (!buffer.indentLine(caretLine, true)) { + if (!buffer.indentLine(caretLine, true)) + { // If the line was already correctly indented, the // caret needs to be moved explicitly. - if (lineContainsSpaceAndTabs(caretLine)) { + if (lineContainsSpaceAndTabs(caretLine)) + { goToEndOfLine(false); - } else { + } + else + { goToStartOfWhiteSpace(false); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mak...@us...> - 2015-08-13 09:46:58
|
Revision: 24016 http://sourceforge.net/p/jedit/svn/24016 Author: makarius Date: 2015-08-13 09:46:56 +0000 (Thu, 13 Aug 2015) Log Message: ----------- More meaningful average, using typical representatives of wide/narrow/normal characters. Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2015-08-12 20:38:12 UTC (rev 24015) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2015-08-13 09:46:56 UTC (rev 24016) @@ -4872,7 +4872,7 @@ // Calculate an average to use a reasonable value for // propotional fonts. - String charWidthSample = " 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + String charWidthSample = "mix"; charWidthDouble = painter.getFont().getStringBounds(charWidthSample, painter.getFontRenderContext()).getWidth() / charWidthSample.length(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2015-09-04 23:21:17
|
Revision: 24048 http://sourceforge.net/p/jedit/svn/24048 Author: daleanson Date: 2015-09-04 23:21:14 +0000 (Fri, 04 Sep 2015) Log Message: ----------- Added some bounds checking. Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2015-09-04 20:16:09 UTC (rev 24047) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2015-09-04 23:21:14 UTC (rev 24048) @@ -4904,15 +4904,22 @@ chunkCache.reset(); gutter.repaint(); painter.repaint(); + + // reset the horizontal scrollbar and caret SwingUtilities.invokeLater(new Runnable() { public void run() { - horizontal.setValue(hbarPosition); - setCaretPosition(caretPosition); + if (hbarPosition >= horizontal.getMinimum() && hbarPosition <= horizontal.getMaximum()) + { + horizontal.setValue(hbarPosition); + } + if (caretPosition >= 0 && caretPosition < buffer.getLength()) + { + setCaretPosition(caretPosition); + } } }); - } //}}} //{{{ addActionSet() method This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2015-09-16 16:03:32
|
Revision: 24069 http://sourceforge.net/p/jedit/svn/24069 Author: daleanson Date: 2015-09-16 16:03:29 +0000 (Wed, 16 Sep 2015) Log Message: ----------- Fix for bug #3928. Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2015-09-15 20:13:51 UTC (rev 24068) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2015-09-16 16:03:29 UTC (rev 24069) @@ -43,6 +43,7 @@ import javax.swing.text.Segment; import javax.swing.text.TabExpander; +import org.gjt.sp.jedit.Buffer; import org.gjt.sp.jedit.Debug; import org.gjt.sp.jedit.IPropertyManager; import org.gjt.sp.jedit.JEditActionContext; @@ -4847,7 +4848,7 @@ if(buffer == null) return; - final int caretPosition = getCaretPosition(); + final int caretPosition = buffer.getIntegerProperty(Buffer.CARET, getCaretPosition()); final int hbarPosition = horizontal.getValue(); if(buffer.getBooleanProperty("elasticTabstops")) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2015-12-21 17:55:13
|
Revision: 24246 http://sourceforge.net/p/jedit/svn/24246 Author: daleanson Date: 2015-12-21 17:55:10 +0000 (Mon, 21 Dec 2015) Log Message: ----------- A different fix for bug #3911, text area scrolls to left on save. Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2015-12-21 16:42:46 UTC (rev 24245) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2015-12-21 17:55:10 UTC (rev 24246) @@ -4852,6 +4852,8 @@ if(buffer == null) return; + final int hbarPosition = horizontal.getValue(); + if(buffer.getBooleanProperty("elasticTabstops")) { //call this only if it was previously off @@ -4906,6 +4908,14 @@ chunkCache.reset(); gutter.repaint(); painter.repaint(); + SwingUtilities.invokeLater(new Runnable() + { + public void run() + { + horizontal.setValue(hbarPosition); + } + }); + } //}}} //{{{ addActionSet() method This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2016-01-01 20:04:45
|
Revision: 24282 http://sourceforge.net/p/jedit/svn/24282 Author: daleanson Date: 2016-01-01 20:04:42 +0000 (Fri, 01 Jan 2016) Log Message: ----------- Fix for bug #3911 when saving a buffer the text area scrolls to left. Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2016-01-01 19:22:30 UTC (rev 24281) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2016-01-01 20:04:42 UTC (rev 24282) @@ -4852,8 +4852,6 @@ if(buffer == null) return; - final int hbarPosition = horizontal.getValue(); - if(buffer.getBooleanProperty("elasticTabstops")) { //call this only if it was previously off @@ -4912,7 +4910,7 @@ { public void run() { - horizontal.setValue(hbarPosition); + scrollToCaret(false); } }); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dal...@us...> - 2016-05-03 21:15:40
|
Revision: 24368 http://sourceforge.net/p/jedit/svn/24368 Author: daleanson Date: 2016-05-03 21:15:37 +0000 (Tue, 03 May 2016) Log Message: ----------- Fix for tracker #3957 that also preserves the fix for #3911. Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2016-04-25 20:06:24 UTC (rev 24367) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2016-05-03 21:15:37 UTC (rev 24368) @@ -564,7 +564,11 @@ */ public final int getFirstPhysicalLine() { - return displayManager.firstLine.getPhysicalLine(); + if (displayManager != null && displayManager.firstLine != null) + { + return displayManager.firstLine.getPhysicalLine(); + } + return 0; } //}}} //{{{ setFirstPhysicalLine() methods @@ -575,7 +579,9 @@ */ public void setFirstPhysicalLine(int physFirstLine) { - setFirstPhysicalLine(physFirstLine,0); + if (physFirstLine < 0) + physFirstLine = 0; + setFirstPhysicalLine(physFirstLine, 0); } /** @@ -4851,6 +4857,8 @@ { if(buffer == null) return; + + final int firstPhysicalLine = getFirstPhysicalLine(); if(buffer.getBooleanProperty("elasticTabstops")) { @@ -4859,7 +4867,7 @@ { turnOnElasticTabstops(); } - if(buffer.getColumnBlock()!=null) + if(buffer.getColumnBlock() != null) { buffer.getColumnBlock().setTabSizeDirtyStatus(true, true); } @@ -4891,7 +4899,7 @@ softWrap = "soft".equals(wrap) && !"limited".equals(largeFileMode) && !"nohighlight".equals(largeFileMode); boolean oldWrapToWidth = wrapToWidth; int oldWrapMargin = wrapMargin; - setMaxLineLength(buffer.getIntegerProperty("maxLineLen",0)); + setMaxLineLength(buffer.getIntegerProperty("maxLineLen", 0)); boolean wrapSettingsChanged = !(wrap.equals(oldWrap) && oldWrapToWidth == wrapToWidth @@ -4910,7 +4918,7 @@ { public void run() { - scrollToCaret(false); + setFirstPhysicalLine(firstPhysicalLine); } }); @@ -5019,13 +5027,11 @@ if(max != maxHorizontalScrollWidth) { maxHorizontalScrollWidth = max; - horizontal.setValues(Math.max(0, - Math.min(maxHorizontalScrollWidth + charWidth - - painter.getWidth(), - -horizontalOffset)), + horizontal.setValues( + horizontal.getValue(), painter.getWidth(), - 0,maxHorizontalScrollWidth - + charWidth); + 0, + maxHorizontalScrollWidth + charWidth); horizontal.setUnitIncrement(10); horizontal.setBlockIncrement(painter.getWidth()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mak...@us...> - 2016-07-17 18:16:38
|
Revision: 24460 http://sourceforge.net/p/jedit/svn/24460 Author: makarius Date: 2016-07-17 18:16:35 +0000 (Sun, 17 Jul 2016) Log Message: ----------- Removed junk stemming from my own patch #566. Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2016-07-16 02:42:50 UTC (rev 24459) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2016-07-17 18:16:35 UTC (rev 24460) @@ -1626,7 +1626,7 @@ // Scan backwards, trying to find a bracket String openBrackets = "([{«‹⟨⌈⌊⦇⟦⦃"; - String closeBrackets = ")]}»›⟩⌉⌋⦈⟧⦄'"; + String closeBrackets = ")]}»›⟩⌉⌋⦈⟧⦄"; int count = 1; char openBracket = '\0'; char closeBracket = '\0'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |