Skip to main content

break_positions_poll

Function break_positions_poll 

Source
pub fn break_positions_poll(
    chars: &[char],
    advances: &[i32],
    max_w: i32,
    break_all: bool,
    overflow_wrap: bool,
    start_forbidden: impl Fn(char) -> bool,
    end_forbidden: impl Fn(char) -> bool,
    poll: impl FnMut() -> bool,
) -> Vec<usize>
Expand description

break_positions_ex に、BREAK_POLL_EVERY 文字ごとに poll を呼ぶ口を付けたもの(2026-11-18、TODO R2 (b) ②)。

100 万文字の文字の塊では 1 回の呼び出しが長く、止める確かめを通らなかった。呼び出し側は poll で止める確かめ (window_mgr::layout_poll)を呼ぶ。poll が true を返したら、そこまでに求めた位置を返して終わる (このタブを捨てる途中なので、残りの行は要らない)。poll は錠を持っていない所でだけ止める確かめを呼ぶこと。