Editing Persian text

  • I want to report a bug while editing Persian text.
    In a Persian text select one word then delete it, you will see another word is deleted.
    for example try to delete below word
    in the following sentence:
    این یک جمله آزمایشی به زبان فارسی است
    the result is:
    این یک جمله آزمایشان فارسی است
    that still has


  • You are using rtl view, aren’t you?
    I have no experience in using npp with rtl languages
    but if you are certain this is a bug, you might consider reporting it here.
    BUT it is most likely that this isn’t an npp issue at all
    because the underlying control used is scintilla which might
    then be reported to their bug tracker.

  • Might be related to this RTL discussion from December – read down from the post I linked to the bottom. There are a couple of related RTL issues. At first, it was about RTL not rendering right-justified, caused by DSpellCheck plugin; but starting partway through, it was more focused on arrow-key direction in RTL and bad selection of RTL text.

    Unfortunately, it is really hard to disambiguate whether the problem lies in the underlying Scintilla component, or the glue that Notepad++ wraps around Scintilla, or in the interface between the two. In that last thread, we weren’t able to pin it down.

  • @Ekopalypse
    Yes Persian is a rtl language and by viewing as rtl (ctrl+alt+r) I can select and delete words correctly.
    the problem happens when you are looking a Persian text in ltr.
    The expected behavior is select a word and delete the same word.
    this behavior exist in many editors like Ms Word (in rtl or ltr for a RTL language)
    I am sure this is a bug.
    another issue is when a word is deleted in RTL mode, if you return to LTR, you can not select words correctly.

  • @PeterJones
    quote from that post: “correction: the problem is only on LTR layout (both NPP and SciTE). on NPP in RTL is working fine.”

    yes I have check this issue in RTL layout and it was correct, but even in LTR mode it could be correct.
    the result of selecting and deleting must be the same in RTL or LTR.
    I can see this behavior right now in this online text editor:

    این یک متن آزمایشی است

    by selecting and deleting each word, the same word is deleted and it does not matter I am using LTR or RTL (pressing LCTRL+Shift or RCTRL+Shift)

    anyway thanks for you answer.

  • @demon740

    this might sound odd but can you give it a try to set
    python language to the current active document?
    Seems to solve the issue for me.

  • Did further test and it seems that assigning any lexer solves the issue, even UDL.
    So there is some initialization code missing if “normal text” aka “no lexer” is used.

Log in to reply