PreviousNextTracker indexSee it online !

(65/211) 3477 - bsh selection behaviour inconsistent in collapsed fold

jEdit 4.3.2
Java 1.6.0_22
Ubuntu 10.04

textArea.setCaretPosition(idindex); in the attached bsh macro expands the fold containing the caret position if the fold is collapsed. However,
textArea.goToStartOfLine(false);
textArea.goToNextLine(true);
textArea.goToNextLine(true);
textArea.goToNextLine(true);
select one line when the target fold is collapsed and 3 lines when the target fold is open. Uncommenting
// textArea.expandFold(false);
selects 3 lines as expected both when the target fold is open and when the target fold is closed.

Submitted gknittl - 2010-10-20 22:41:11 Assigned
Priority 5 Labels macros
Status open Group minor bug
Resolution None

Comments

2010-10-20 22:41:11
gknittl

bsh testcase

foldbug.bsh (588B)

2010-10-20 22:45:22
gknittl

I can't figure out how to attach a second file so here is the target file corresponding to foldbug.bsh

:folding=indent:collapseFolds=1:
top level
indent line 1
indent line 2
indent line 3
indent line 4
indent line 5

2010-10-20 22:47:36
gknittl

target file for foldbug.bsh

foldbug.txt (123B)

2010-10-20 22:48:41
gknittl

attached foldbug.txt as a file as well

2010-10-20 22:53:28
gknittl

just noticed Sourceforge stripped the leading blanks from the target file in the comments. The last 5 lines should be indented (2 spaces but I don't think exact level matters). The attached foldbug.txt should be correct.

2010-12-08 16:34:27
ezust

- **assigned_to**: ezust --> nobody