Community
    • 登入

    Bug with folding in user-defined language

    已排程 已置頂 已鎖定 已移動 Notepad++ & Plugin Development
    2 貼文 1 Posters 7.2k 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Gerd MüllerG
      Gerd Müller
      最後由 編輯

      Hi all,
      I assume there is a little bug in the folding process.

      Firstly excuse me for my English but it’s not my native language. So please ignore any grammar failures and sorry for that!

      I have defined my own user language with separate open and close definitions. In general this works perfect and is very helpfully for our documentation. But in some cases (when I cascade such folding blocks) there are some trouble. The lines marked on the left side with the +/- sign are not matching with the real lines. When I fold such inner block, mostly the complete file to the end or the block with a wrong line number is folded. This error only occurs, when I have defined more than one block. I used the version 6.7.5 and upgraded now to 6.8 with the same problem. Did anyone known this problem?

      Here is an example for the definitions:
      Folding in code 1 styler
      open: #(
      close: #[

      Here a code text:
      #(001-005) headline 1
      #(001) step 1
      some comments here
      #[yyyymmd hh:mm] finish step 1
      #(002) step 2
      some comments here
      #[yyyymmd hh:mm] finish step 2
      …
      #[closing group 1 to 5]
      …

      With a click on the - sign left of line #(001) the block step 1 is folded, same with the others. If I click on the +/- sign left of the first line the complete group is closed or opened.

      But sometimes (repeatable, often after larger comment blocks (without the signs for block start/end)) the line counter counts a wrong number and the block end marker is not in the line of the close-definition. Even the next start is moved and not synchron to the line with the open definition.
      An interessting effect: If I change one character in the block (even if I change a space through a new space) the marking is renewed an shows the exact lines, but if I move the cursor to an other location and scroll back to the block the mark of the block is wrong.

      A long text for a little problem :)
      But I love Notepad++ and I were very happy if this bug would be fixed in one of the next releases.
      Thank you a lot and have a nice day(s).

      Gerd MüllerG 1 條回覆 最後回覆 回覆 引用 0
      • Gerd MüllerG
        Gerd Müller @Gerd Müller
        最後由 Gerd Müller 編輯

        here is an update to this bug:

        The problem only exist if I additional define a Comment&Number style (its equal if the style is defined as a comment line style with an open and a close condition or as a comment style). In both cases the folding defined by the Folder&Style (Folding in code 1 style) doesn’t works correctly.

        1 條回覆 最後回覆 回覆 引用 0
        • 第一個貼文
          最後的貼文
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors