Menu

#3477 bsh selection behaviour inconsistent in collapsed fold

minor bug
open
nobody
macros (56)
5
2010-12-08
2010-10-20
Greg Knittl
No

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.

Discussion

  • Greg Knittl

    Greg Knittl - 2010-10-20

    bsh testcase

     
  • Greg Knittl

    Greg Knittl - 2010-10-20

    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

     
  • Greg Knittl

    Greg Knittl - 2010-10-20

    target file for foldbug.bsh

     
  • Greg Knittl

    Greg Knittl - 2010-10-20

    attached foldbug.txt as a file as well

     
  • Greg Knittl

    Greg Knittl - 2010-10-20

    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.

     
  • Alan Ezust

    Alan Ezust - 2010-12-08
    • assigned_to: ezust --> nobody
     

Log in to post a comment.