Alexey-T / CudaText

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

whole-word selection by mouse must stop at symbol chars #4723

Closed adoeller closed 1 year ago

adoeller commented 1 year ago

20230101_14-24-40

[...]  
for repeater in data["relais"]:
    try:
      if repeater["mode"] in modes:
        if not (checkbox_2_widget.get() == 1   and (144 <= repeater["rx"] <= 148) \
             or checkbox_70_widget.get() == 1  and (400 <= repeater["rx"] <= 460) \
             or checkbox_alle_widget.get() == 1):
          continue

        # Create a new waypoint element for the repeater
        waypoint = ET.SubElement(gpx, "wpt", lat=str(repeater["lat"]), lon=str(repeater["lon"]))
        offset   = round(repeater['rx'] - repeater['tx'], 5)
        band     = " VHF" if 140 <= repeater["rx"] <= 160 else " UHF"
        echolink = f", Echolink: {repeater['el']}" if repeater['el'] != "" else ""

        # Set the waypoint's name and other metadata
        ET.SubElement(waypoint, "name").text = f"{repeater['call']}{band}"
        ET.SubElement(waypoint, "cmt").text  = f"{repeater['qth']}, {repeater['locator']}"
        ET.SubElement(waypoint, "type").text = f"{repeater['remarks']}{echolink}"
        ET.SubElement(waypoint, "link").text = repeater["url"]
        ET.SubElement(waypoint, "sym").text  = "Radio Beacon"
        if offset < 10.:
          ET.SubElement(waypoint, "desc").text = f"{repeater['mode']}, Rx: {repeater['tx']} MHz, Offset: {offset} MHz"
[...]
window.geometry("268x340+"+ str(int(window.winfo_screenwidth()-268)/2)[:-2] + "+" + str(int(window.winfo_screenheight()-340)/2)[:-2])
[...]

now i double click on a word and want to extend the selection to feasible characters, e.g. " [ ( ' this does not work for most of the code examples. only in the last line (window.geometry ...) it is working. can i configure cudatext to recognize more characters to snap to?

Alexey-T commented 1 year ago

do you mean that double-click + select - must stop after every "[( char? and now it skips group of all symbol chars?

adoeller commented 1 year ago

i suggest that. i stumbled over that during programming, only words should be selected as one. i double checked with vscode and sublime and thats how it works there.

Alexey-T commented 1 year ago

agreed with suggestion. todo.

Alexey-T commented 1 year ago

do you use Win64bit? I will give the beta to test.

adoeller commented 1 year ago

yes, i do.

Alexey-T commented 1 year ago

beta: http://uvviewsoft.com/c/ . test your other issues too.

adoeller commented 1 year ago

Thanks. it works well after words, but not in front of them. 20230101_18-47-48

You see it is skipping the " and the ( in front of the words.

i reportet a couple of bugs, because I switched to your editor as my main editor. :)

Alexey-T commented 1 year ago

seems fixed now. will post beta update later.

Alexey-T commented 1 year ago

beta file updated.

adoeller commented 1 year ago

very nice. works for me :)