我將“ if”塊設置為可折疊,
我一直在像這樣使用它們
如果(1 == 1,//註釋abc
<可折疊代碼塊1>);
如果(1 == 1,//註釋xyz
<可折疊代碼塊2>);
但是通常,第一個塊會捕穫後面的塊並將它們全部折疊在一起。
該代碼可以正常工作,但是有時很難找到代碼,因此容易出錯。
有解決這個問題的方法嗎?
我遇到了相同的問題(使用JMP15.2.1)。
我設法重複了一次,但是我不確定這有多可靠:
1.開始於:
Expr(
if(
//example inside here IF
//example inside here IF
//example inside here IF
);
//example inside here EXPR
//example inside here EXPR
//example inside here EXPR
);
2.刪除);從第6行開始:
Expr(
if(
//example inside here IF
//example inside here IF
//example inside here IF
//example inside here EXPR
//example inside here EXPR
//example inside here EXPR
);
3.在第5行上按Enter,然後添加新的if語句:
Expr(
if(
//example inside here IF
//example inside here IF
//example inside here IF
if(
);
//example inside here EXPR
//example inside here EXPR
//example inside here EXPR
);
4.刪除新的If(但離開);
Expr(
if(
//example inside here IF
//example inside here IF
//example inside here IF
);
//example inside here EXPR
//example inside here EXPR
//example inside here EXPR
);
從第3部分開始的圖片:
如果是新的:

如果已刪除,則為新代碼(代碼折疊方塊有些奇怪):

之後重新打開腳本:

至少在這種情況下,如果從代碼中間刪除了某些內容,似乎代碼折疊沒有得到正確的更新。 對我來說,它通常是通過重新啟動JMP或只是關閉並重新打開腳本來解決。