Hi,
Check the demo. Press F1 will shift hightlight format.
If caret position is not the same as selection in format tag?, and invisible?, 
then some scroll will happen.

And, where should I report issue like this?  i...@tecgraf.puc-rio.br?
```lua
local iup=require'iuplua'
local Line=1
iup.dialog{
        iup.text{
                MULTILINE='YES',
                EXPAND='YES',VISIBLELINES=3,
                FORMATTING='YES',
                
VALUE="a123456\nb123456\nc123456\nd123456\ne123456\nf123456\ng123456\nh123456\ni123456",
                map_cb=function(Text)
                        Text.CARET='5:1'
                end,--map_cb
                k_any=function(Text,C)
                        if C==iup.K_F1 then
                                Line=math.fmod(Line,tonumber(Text.LINECOUNT))+1
                                local Tags=iup.user{
                                        BULK='YES',
                                        CLEANOUT='YES',
                                        iup.user{
                                                
SELECTION=Line..',1'..':'..Line..',5',
                                                BGCOLOR='220 220 220',
                                        },
                                }
                                Text.addformattag=Tags
                        end
                end,--k_any
        },--text
}:show()
iup.MainLoop()

```

<<attachment: iup_text_format_scroll_bug.gif>>

_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to