Hi~ In the demo, select some text using mouse, select from right to left, the selection (caret-anchor) will be break. Attachment is the demonstration animation.
```lua
local iup=require'iuplua'
iup.dialog{
iup.text{
MULTILINE='YES',
EXPAND='YES',VISIBLELINES=4,
FORMATTING='YES',
VALUE="a123456\nb123456\nc123456",
motion_cb=function(Text)
local Tags=iup.user{
BULK='YES',
CLEANOUT='YES',
}
local Pos=Text.CARETPOS
iup.Append(Tags,iup.user{
selectionpos=Pos..':15',
BGCOLOR='220 220 220',
})
Text.addformattag=Tags
end,
caret_cb=nil,
--issue is irrelevant to `caret_cb`. But could see wrong caret/anchor.
},
}:show()
iup.MainLoop()
```<<attachment: 20230913.iup_text_motion_cb_format_bug.gif>>
_______________________________________________ Iup-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/iup-users
