Alexey-T / CudaText

Cross-platform text editor, written in Free Pascal
Mozilla Public License 2.0
2.54k stars 174 forks source link

regression in 1.218.1 beta, cannot skip ')' on typing over ')'; plugin Hi Occur is reason #5744

Closed Alexey-T closed 1 month ago

Alexey-T commented 1 month ago

user.json

{
  "auto_close_brackets": "([{'\"",
  "auto_fold_comments": 2,
  "autocomplete_autoshow_chars": 1,
  "autocomplete_closing_delay": 0,
  "autocomplete_commit_chars": "",
  "autocomplete_replace_on_right": false,
  "carethistory_gap_size": 0,
  "detect": {
    "*.jsm": "JavaScript",
    "*.sys.mjs": "JavaScript",
  },
  "find_ctrl_enter": false,
  "find_hi_max_lines": 100000,
  "find_hi_max_line_len": 100000,
  "find_wrapped_blinking": "EdMarkedRangeBg",
  "fold_tooltip_show": true,
  "find_suggest_sel": false,
  "gutter_bookmarks": false,
  "max_line_len_brackets": 1000000,
  "max_line_len_for_undo": 1024000,
  "micromap_on_scrollbar": true,
  "micromap_show": true,
  "minimap_drag_immediately": true,
  "minimap_sel_always": true,
  "minimap_show": true,
  "minimap_tooltip_show": true,
  "minimap_tooltip_height": 20,
  "minimap_tooltip_width": 80,
  "mouse_click_links": 0,
  "newdoc_lexer": "Text with indentation",
  "renderer_tweaks__linux": "nosw",
  "scrollbar_click_jump": true,
  "show_cur_line": true,
  "tab_size": 2,
  "tab_spaces": true,
  "ui_button_hover": true,
  "ui_dialogs_in_taskbar__linux": false,
  "ui_history_disabled": "TeMmrunSC",
  "ui_listbox_complete_size_x": 300,
  "ui_listbox_fuzzy": true,
  "ui_max_size_lexer": 10,
  "ui_sidebar_show": false,
  "ui_sidepanel_on_start": 2,
  "ui_statusbar_carets": "{_ln} {y}, {_col} {xx}, Caret {offset_caret}, Total {offset_max}, Sel lines {sel}, Sel chars {selchars}, Carets {carets}",
  "ui_statusbar_hint_lines": 0,
  "ui_statusbar_no_sel": "{_ln} {y}, {_col} {xx}, Caret {offset_caret}, Total {offset_max}",
  "ui_statusbar_panels": "caret,A|enc,C,125|ends,A|lexer,C,140|tabsize,A|zoom,A|msg,L",
  "ui_statusbar_small_sel": "{_ln} {y}, {_col} {xx}, Caret {offset_caret}, Total {offset_max}, Sel chars {selchars}",
  "ui_statusbar_str_sel": "{_ln} {y}, {_col} {xx}, Caret {offset_caret}, Total {offset_max}, Sel lines {sel}, Sel chars {selchars}",
  "ui_tab_recent_on_close": true,
  "ui_tab_show_plus": false,
  "ui_tab_show_x": 0,
  "ui_tab_variable_width": true,
  "unprinted_content": "wstT",
  "unprinted_show": true,
  "unprinted_tab_len": 0,
  "wrap_enabled_max_lines": 100000,
  "wrap_mode": 1
}

@pintassilgo Let's post here, coz I dont get notifications about posts in 'discussions' sometimes

pintassilgo commented 1 month ago

Culprit: hilite plugin. Install it.

Alexey-T commented 1 month ago

Repeated!

pintassilgo commented 1 month ago

So is it a bug in the plugin?

Alexey-T commented 1 month ago

Plugin changes caret pos here

    else: # wrap=on
        ed_self.set_caret(
            0,
            line_top,
            ed_self.get_line_len(line_btm),
            line_btm,
            app.CARET_SET_ONE,
            options=app.CARET_OPTION_NO_SCROLL
            )
        #print("wrap on; caret: {}, text: '{}', opts: '{}'".format(ed_self.get_carets(), text, opts))
        res = ed_self.action(app.EDACTION_FIND_ALL, text, opts, 0x7FFFFFFF)
    #end if wrap

it makes Cud trigger 'caret leaved orig line'. I think how to fix.

pintassilgo commented 1 month ago

And do you know why it only happens in files with >500 lines?

pintassilgo commented 1 month ago

It's a good time to replace "caret left orig line" by "caret left inline block". =P

Alexey-T commented 1 month ago

500 maybe is related to value of HiOccur option?

Alexey-T commented 1 month ago

seems I fixed it.

pintassilgo commented 1 month ago

Fixed, thanks.