#2776 Word Wrap does not work in Hard mode

closed-fixed
Alan Ezust
5
2007-01-10
2006-12-28
Geoff
No

When a line contains a lot of text then I have observe the following:

Word Wrap: None - works exactly as expected, long lines are displayed on one long line
Word Wrap: Soft - breaks lines where there is a space character, which is as I would expect
Word Wrap: Hard - initially looks like None but after "Format Paragraph" looks like soft, looks like a bug

Changes made using Buffer Options.

I would expect Hard to wrap at 80 characters irrespective to space characters etc.

Selecting Hard mode and then "Format Paragraph" marks the file as Edited which is not what I would expect having typed nothing.

Using jEdit 4.3 Pre 8

Discussion

  • Logged In: YES
    user_id=285591
    Originator: NO

    Hi, I think it is not a bug. You should read again the documentation about wrapping :
    the Hard Wrap really change your text introducing some new lines like a word processor does

     
    • status: open --> closed
     
    • status: closed --> closed-invalid
     
  • Geoff
    Geoff
    2006-12-29

    Logged In: YES
    user_id=869700
    Originator: YES

    I have to disagree, word processors do not break up long lines by adding a new line they wrap it on the screen.

    Let's say I have a file with 4 lines of text, each 300 characters long and each character is between a and z, no space, tab or other white space. I would expect this:

    Word Wrap = None: 4 lines displayed each very long and I can scroll to the right using my cursor or scroll bar
    Word Wrap = Soft: same as None because there are no spaces
    Word Wrap = Hard: the 4 lines are either wrapped to the screen or the margin, so the horizontal scroll bar is not needed but the file contents are unchanged

    Take a look at Windows Notepad, it does what I am talking about, except the intelligent soft mode of course! I still find myself using Notepad instead of jEdit, which seems very wrong!

     
  • Geoff
    Geoff
    2006-12-29

    • status: closed-invalid --> open
     
  • Logged In: YES
    user_id=285591
    Originator: NO

    Hi, I was wrong about the comparison with word processors, you're right. But here is the doc of the Hard Wrap

    In hard wrap mode, inserting text at the end of a line will automatically break the line if it extends beyond the wrap margin. Inserting or removing text in the middle of a line has no effect, however text can be re-wrapped using the Edit>Text>Format Paragraph command.

    What you expect is a softwrap that do not cut between words but at a fixed column count right ?
    I'm sorry this is not a bug since the hard wrap does what the doc says. It is a new feature request I think (or maybe it is possible to do that with the soft wrap ?)

     
    • milestone: 101607 -->
    • status: open --> closed-invalid
     
  • Geoff
    Geoff
    2006-12-29

     
    Attachments
  • Geoff
    Geoff
    2006-12-29

    • status: closed-invalid --> open
     
  • Geoff
    Geoff
    2006-12-29

    Logged In: YES
    user_id=869700
    Originator: YES

    I have attached a test file, this does not seem to work with Hard Wrap as described in the documentation you quoted, so that may be a bug. However I do fail to see the use of the hard mode but let's not go there!

    Shall I raise a Feature Request for "Wrap Mode: Window" then? This sounds like the right way forward to me what do you think?
    File Added: jEditTestFile.txt

     
  • Logged In: YES
    user_id=285591
    Originator: NO

    Hi, maybe there is a missing information in the doc : the line is broken only on spaces.
    And yes I think a new feature request for a wrap mode : window is the right thing. Unless someone knows a way to do that ? But I don't think it is already possible

     
  • Geoff
    Geoff
    2006-12-29

    Logged In: YES
    user_id=869700
    Originator: YES

    I have attached the old document from the help and my proposed update which I think helps clarify the matter. I am happy for this to be improved upon.

    I will raise the feature request when I have written some more detail on it.

    Thanks, Geoff

     
  • Geoff
    Geoff
    2006-12-29

    Original File from Pre8

     
    Attachments
  • Geoff
    Geoff
    2006-12-29

    Logged In: YES
    user_id=869700
    Originator: YES

    File Added: word-wrap.html

     
  • Geoff
    Geoff
    2006-12-29

    My updated help file

     
  • Geoff
    Geoff
    2006-12-29

    Logged In: YES
    user_id=869700
    Originator: YES

    File Added: word-wrap_updated.html

     
    • status: open --> closed-invalid
     
  • Logged In: YES
    user_id=285591
    Originator: NO

    I close this bug it is now a feature request

     
  • Geoff
    Geoff
    2007-01-10

    • labels: 102668 --> documentation
    • status: closed-invalid --> open
     
  • Geoff
    Geoff
    2007-01-10

    Logged In: YES
    user_id=869700
    Originator: YES

    There is a feature request. However I do not think this can be closed because the documentation needs changing, so I have amended the category accordingly.

     
  • Alan Ezust
    Alan Ezust
    2007-01-10

    Logged In: YES
    user_id=935841
    Originator: NO

    I clarified in the docs that for the purposes of word wrap, a word boundary means whitespace.

    Index: text-edit.xml

    --- text-edit.xml (revision 8326)
    +++ text-edit.xml (working copy)
    @@ -430,16 +430,17 @@
    </para>
    </sect1>
    <sect1 id="word-wrap"><title>Wrapping Long Lines</title>
    - <para>
    - The <firstterm>word wrap</firstterm> feature splits lines at word
    - boundaries in
    - order to fit text within a specified wrap margin.
    - The wrap margin
    - position is indicated in the text are as a faint blue vertical line.
    - There are two <quote>wrap modes</quote>, <quote>soft</quote> and
    - <quote>hard</quote>; they are described below. The current wrap mode is shown in the status bar; see <xref linkend="status-bar"/>. The wrap mode can be
    - changed in one of the following ways:
    - </para>
    + <para>
    + The <firstterm>word wrap</firstterm> feature splits lines at word
    + boundaries in order to fit text within a specified wrap margin. A word
    + boundary, for the purposes of jEdit, means whitespace. Long lines without
    + whitespace are not wrapped by jEdit. The wrap margin position is indicated in
    + the text are as a faint blue vertical line. There are two <quote>wrap
    + modes</quote>, <quote>soft</quote> and <quote>hard</quote>; they are described
    + below. The current wrap mode is shown in the status bar; see <xref
    + linkend="status-bar"/>. The wrap mode can be changed in one of the following
    + ways:
    + </para>
    <itemizedlist>
    <listitem><para>On a global or mode-specific
    basis in the

     
  • Alan Ezust
    Alan Ezust
    2007-01-10

    • assigned_to: nobody --> ezust
    • status: open --> closed-fixed