mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-08 19:02:56 +00:00
TextWrapped will cause too-many-vertices error for long single-line strings #7496
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#7496
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version/Branch of Dear ImGui:
Version 1.90.5
Back-ends:
imgui_impl_sdl2.cpp + imgui_impl_sdlrenderer2.cpp
Compiler, OS:
Windows 10 + MSVC 2022
Full config/build information:
No response
Details:
ImGui::TextWrappedand other text functions using wrap-pos settings will causetoo-many-verticeserror when displaying longsingle-linestrings.Background: I met this problem when trying to
TextWrappedthe linesgetline-ed from files. I got the assertion failure after unexpectedly opening a large non-text file (which does not contain\n).Similar issue: #5720
Screenshots/Video:
The effect for the first example below:

Minimal, Complete and Verifiable Example code:
The problem is not limited to
TextWrapped. It can affect every text function via wrap-pos settings: