Lines Matching refs:line
147 pub fn get_linesize(&self, line: u16) -> u16 { in get_linesize()
149 let line = buf.get(self.offset.load(Ordering::SeqCst) + line as usize); in get_linesize() localVariable
150 if line.is_none() { in get_linesize()
154 let line = line.unwrap(); in get_linesize() localVariable
156 line.data.len() as u16 in get_linesize()
159 pub fn get_linesize_abs(&self, line: u16) -> u16 { in get_linesize_abs()
161 let line = buf.get(line as usize); in get_linesize_abs() localVariable
162 if line.is_none() { in get_linesize_abs()
166 let line = line.unwrap(); in get_linesize_abs() localVariable
168 line.data.len() as u16 in get_linesize_abs()
174 let line = buf.get_mut(self.offset.load(Ordering::SeqCst) + y as usize); in remove_char() localVariable
175 if line.is_none() { in remove_char()
179 line.unwrap().remove(x as usize); in remove_char()
184 let line = buf.get_mut(self.offset.load(Ordering::SeqCst) + y as usize); in remove_str() localVariable
185 if line.is_none() { in remove_str()
189 line.unwrap().data.drain(x..x + n); in remove_str()
193 pub fn get_line(&self, line: u16) -> LineBuffer { in get_line()
195 let line = buf.get(self.offset.load(Ordering::SeqCst) + line as usize); in get_line() localVariable
196 if line.is_none() { in get_line()
199 line.unwrap().clone() in get_line()
211 pub fn merge_line(&self, line: u16) -> (bool, usize) { in merge_line()
212 let line = self.offset.load(Ordering::SeqCst) + line as usize; in merge_line() localVariable
213 if line == 0 { in merge_line()
219 let cur_line = buf.get(line as usize).unwrap().clone(); in merge_line()
221 let previous_line = buf.get_mut(line - 1).unwrap(); in merge_line()
235 buf.remove(line as usize); in merge_line()
244 let line = buf.get_mut(self.offset() + y as usize); in insert_char() localVariable
245 match line { in insert_char()
246 Some(line) => line.insert(x as usize, ch), in insert_char()
282 let line = buf.get_mut(line_index); in add_line_flags() localVariable
284 if line.is_none() { in add_line_flags()
288 let line = line.unwrap(); in add_line_flags() localVariable
290 line.flags.insert(flags); in add_line_flags()
294 flag_map.insert(line.id, line_index); in add_line_flags()
299 locked_map.insert(line.id, line_index); in add_line_flags()
306 let line = buf.get_mut(line_index); in remove_line_flags() localVariable
308 if line.is_none() { in remove_line_flags()
312 let line = line.unwrap(); in remove_line_flags() localVariable
314 line.flags.remove(flags); in remove_line_flags()
318 flag_map.remove(&line.id); in remove_line_flags()
323 locked_map.remove(&line.id); in remove_line_flags()
328 pub fn line_flags(&self, line: u16) -> LineState { in line_flags()
329 self.get_line(line).flags in line_flags()
379 let line = buffer.get(index).unwrap(); in delete_lines() localVariable
380 if line.flags.contains(LineState::LOCKED) { in delete_lines()
393 let line = buffer.get(y); in delete_line() localVariable
394 if line.is_none() { in delete_line()
397 let line = line.unwrap(); in delete_line() localVariable
398 if line.data.is_empty() { in delete_line()
402 if !line.flags.contains(LineState::LOCKED) { in delete_line()
410 let line = buffer.get_mut(y).unwrap(); in delete_until_line_beg() localVariable
412 let len = line.data.len(); in delete_until_line_beg()
416 line.data.drain(0..x.min(len - 1)); in delete_until_line_beg()
423 let line = buffer.get_mut(y).unwrap(); in delete_until_endl() localVariable
424 let len = line.data.len(); in delete_until_endl()
428 line.data.drain(x..len - 1); in delete_until_endl()
439 let line = match buf.get(self.offset.load(Ordering::SeqCst) + y as usize) { in search_nextw_begin() localVariable
440 Some(line) => line, in search_nextw_begin()
445 let lchar = line[left] as char; in search_nextw_begin()
446 let rchar = line[right] as char; in search_nextw_begin()
471 let line = match buf.get(self.offset.load(Ordering::SeqCst) + y as usize) { in search_nextw_end() localVariable
472 Some(line) => line, in search_nextw_end()
477 let lchar = line[left] as char; in search_nextw_end()
478 let rchar = line[right] as char; in search_nextw_end()
506 let line = match buf.get(self.offset.load(Ordering::SeqCst) + y as usize) { in search_prevw_begin() localVariable
507 Some(line) => line, in search_prevw_begin()
511 let lchar = line[left as usize] as char; in search_prevw_begin()
512 let rchar = line[right as usize] as char; in search_prevw_begin()
539 let line = buf.get(abs_y as usize).unwrap(); in search_prevw_begin_abs() localVariable
541 let lchar = line[left as usize] as char; in search_prevw_begin_abs()
542 let rchar = line[right as usize] as char; in search_prevw_begin_abs()