Skip to content

Commit

Permalink
A fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shmuz committed Mar 8, 2024
1 parent f9c6d26 commit 9a1ecd1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Macros/scripts/Third_party/bito.lua
Expand Up @@ -108,11 +108,10 @@ local function bito (prompt)
local autowrap = bit64.band(ei.Options, F.EOPT_AUTOINDENT)~=0
if autowrap then editor.SetParam(nil, F.ESPT_AUTOINDENT, 0) end
for space,word in Words(pipe) do
ei = editor.GetInfo(Id)
if ei.CurPos + space:len() + word:len() > linewrap then
space = "\n"
end
editor.InsertText(Id, space)
if editor.GetInfo(Id).CurPos + word:len() > linewrap then
editor.InsertText(Id, "\n")
end
editor.InsertText(Id, word)
editor.Redraw(Id)
if hDlg then hDlg:Close(); hDlg = nil; end
Expand Down

0 comments on commit 9a1ecd1

Please sign in to comment.