MCPcopy Create free account
hub / github.com/bajrangCoder/setu / toggle_wrap_lines

Method toggle_wrap_lines

src/views/response_view.rs:200–213  ·  view source on GitHub ↗
(&mut self, window: &mut Window, cx: &mut Context<Self>)

Source from the content-addressed store, hash-verified

198fn virtual_text_rows(content: &str) -> Vec<VirtualTextRow> {
199 if content.is_empty() {
200 return vec![VirtualTextRow {
201 line_number: 1,
202 continuation: false,
203 byte_range: 0..0,
204 }];
205 }
206
207 let mut rows = Vec::new();
208 let mut line_number = 1;
209 let mut line_start = 0;
210
211 while line_start < content.len() {
212 let line_end_with_newline = content[line_start..]
213 .find('\n')
214 .map(|offset| line_start + offset + 1)
215 .unwrap_or(content.len());
216 let mut line_end = line_end_with_newline;

Callers 1

render_tab_contentMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected