pub fn move_to_beginning_of_middle_line(&mut self) {
        self.set_column(0);
        let mut lines = self.line_count();
        if lines % 2 == 0 {
            lines -= 1;
        }
        self.set_line(lines / 2);
    }
/// Moves a cursor to the beginning of the middle line.
/// If the number of the lines is even, the upper line is selected.
///
/// # Examples
///
/// ```
/// # use edit::editor::Editor;
/// let mut editor = Editor::new("aaa\nbbb", 0, 2).unwrap();
/// editor.move_to_beginning_of_middle_line();
/// assert_eq!(editor.line(), 0);
/// assert_eq!(editor.column(), 0);
///
/// let mut editor = Editor::new("aaa\n\
///                               bbb\n\
///                               ccc\n\
///                               ddd\n\
///                               eee", 0, 2).unwrap();
/// editor.move_to_beginning_of_middle_line();
/// assert_eq!(editor.line(), 2);
/// assert_eq!(editor.column(), 0);
/// ```
Moves a cursor to the beginning of the middle line.
If the number of the lines is even, the upper line is selected.
Moves a cursor to the beginning of the middle line . If the number of the lines is even the upper line is selected .
pub fn move_to_beginning_of_middle_line(&mut self) {
        self.set_column(0);
        let mut lines = self.line_count();
        if lines % 2 == 0 {
            lines -= 1;
        }
        self.set_line(lines / 2);
    }
pub fn move_to_beginning_of_middle_line ( & mut self ) { self . set_column ( 0 ) ; let mut lines = self . line_count ( ) ; if lines % 2 == 0 { lines -= 1 ; } self . set_line ( lines / 2 ) ; }
Moves a cursor to the beginning of the middle line.
Moves a cursor to the beginning of the middle line .
&mut self
&mut self
examples
None
use edit::editor::editor;
let mut editor = Editor::new("aaa\nbbb", 0, 2).unwrap();
editor.move_to_beginning_of_middle_line();
assert_eq!(editor.line(), 0);
assert_eq!(editor.column(), 0).

let mut editor = Editor::new("aaa\n\
bbb\n\
ccc\n\
ddd\n\
eee", 0, 2).unwrap();
editor.move_to_beginning_of_middle_line();
assert_eq!(editor.line(), 2);
assert_eq!(editor.column(), 0);
```
let mut editor = Editor :: new ( " aaa \ nbbb " 0 2 ) . unwrap () ; editor . move_to_beginning_of_middle_line () ; assert_eq! ( editor . line () 0 ) ; assert_eq! ( editor . column () 0 ) . let mut editor = Editor :: new ( " aaa \ n \ bbb \ n \ ccc \ n \ ddd \ n \ eee " 0 2 ) . unwrap () ; editor . move_to_beginning_of_middle_line () ; assert_eq! ( editor . line () 2 ) ; assert_eq! ( editor . column () 0 ) ; ` ` `