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

Method copy_response

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

Source from the content-addressed store, hash-verified

222 }
223
224 if line_end == line_start {
225 rows.push(VirtualTextRow {
226 line_number,
227 continuation: false,
228 byte_range: line_start..line_start,
229 });
230 } else {
231 let mut chunk_start = line_start;
232 let mut continuation = false;
233 while chunk_start < line_end {
234 let mut chunk_end = (chunk_start + VIRTUAL_TEXT_ROW_MAX_BYTES).min(line_end);
235 while chunk_end > chunk_start && !content.is_char_boundary(chunk_end) {
236 chunk_end -= 1;
237 }
238 if chunk_end == chunk_start {
239 chunk_end = line_end;
240 }
241 rows.push(VirtualTextRow {
242 line_number,
243 continuation,
244 byte_range: chunk_start..chunk_end,
245 });
246 continuation = true;
247 chunk_start = chunk_end;
248 }
249 }
250
251 line_number += 1;
252 line_start = line_end_with_newline;
253 }
254
255 if content.ends_with('\n') {
256 rows.push(VirtualTextRow {
257 line_number,
258 continuation: false,
259 byte_range: content.len()..content.len(),

Callers 1

render_tab_contentMethod · 0.80

Calls 2

formatted_bodyMethod · 0.80
raw_bodyMethod · 0.80

Tested by

no test coverage detected