Latest post of the previous page:
Макросы на Left/Right конфликтуют с таковыми из SciTE_like в частиOptCursorMoveResetsBlock = false
.- local PersistentBlocks = 2 --Постоянные блоки
- local getValue = -1 --Значение Value может быть равно -1, в этом случае функция ничего не изменит, а вернёт текущее значение настройки.
- local function notPersistent()
- return Editor.Set(PersistentBlocks,getValue)==0
- end
- local GET,GOTO,RESET = 0,1,4
- local SEL_NONE, SEL_STREAM, SEL_BLOCK = 0,1,2
- local START_LINE,START_POS,END_LINE,END_POS,SEL_TYPE = 0,1,2,3,4
- local START,END = 0,1
- local function blockMultiline()
- return Editor.Sel(GET,SEL_TYPE) == SEL_BLOCK and Editor.Sel(GET,START_LINE) ~= Editor.Sel(GET,END_LINE)
- end
- local function NotBlockMultilineNotPersistent()
- return not blockMultiline() and notPersistent()
- end
- Macro { description="Pos to selection end";
- area="Editor"; key="Right"; flags="EVSelection";
- uid="3F6E7542-5FE9-461A-AD9F-CCB2208914FB";
- condition=NotBlockMultilineNotPersistent;
- action=function()
- Editor.Sel(GOTO,END)
- Editor.Sel(RESET)
- end;
- }
- Macro { description="Pos to selection start";
- area="Editor"; key="Left"; flags="EVSelection";
- uid="4C5A497A-65BB-4DE5-A397-4FEB6297E798";
- condition=NotBlockMultilineNotPersistent;
- action=function()
- Editor.Sel(GOTO,START)
- Editor.Sel(RESET)
- end;
- }
GeSHi © Codebox Plus Extension