From: Walter Alejandro Iglesias Subject: Re: vi(1) issue with '!)fmt' at the EOF To: "Todd C. Miller" Cc: tech@openbsd.org Date: Fri, 24 Apr 2026 10:16:17 +0200 On Fri, Apr 24, 2026 at 10:13:14AM +0200, Walter Alejandro Iglesias wrote: > On Fri, Apr 24, 2026 at 09:13:29AM +0200, Walter Alejandro Iglesias wrote: > > On Thu, Apr 23, 2026 at 08:32:59PM -0600, Todd C. Miller wrote: > > > On Thu, 23 Apr 2026 15:20:57 +0200, Walter Alejandro Iglesias wrote: > > > > > > > In a sentence of more than one line, ')fmt' won't format the last line > > > > of the file, *depending on which column you have the cursor*. > > > > > > What I see is that, given a file like this: > > > > > > Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor > > > incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis > > > nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. > > > > > > If I run !)fmt from column 0, the last line is not filtered. If > > > the cursor is not in column 0, the file is filtered as I would > > > expect. > > > > Put the cursor, for example, in the space after "consectetur" and try > > again. Repeat this with my diff. > > I didn't notice your example have two sentences. > > Anyway, what I asked you me notice that my diff does not totally fix the > issue. I noticed something else. With *and* without my diff, if you > put the cursor in the space after a coma (e.g. between "amet, > consectetur") and type ')', the cursor stops in the first character of > the next word. Furthermore, it happens when you put the cursor after any space, not just after a comma. This does not happen in vim. > > I'll investigate. > > > > > > > > > > Is that the issue you are describing, or is it something different? > > > > > > - todd > > > > -- > > Walter > > -- > Walter -- Walter