[gnote] Fix removing bullet on enter at the start of bulleted line
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Fix removing bullet on enter at the start of bulleted line
- Date: Fri, 19 Sep 2014 18:43:30 +0000 (UTC)
commit 09131366e72f928fb1740d212d41ba92673e961f
Author: Aurimas Černius <aurisc4 gmail com>
Date: Fri Sep 19 21:42:24 2014 +0300
Fix removing bullet on enter at the start of bulleted line
Fixes Bug 702018.
src/notebuffer.cpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/notebuffer.cpp b/src/notebuffer.cpp
index 62fdf8c..d258a2f 100644
--- a/src/notebuffer.cpp
+++ b/src/notebuffer.cpp
@@ -381,11 +381,13 @@ namespace gnote {
// previous line.
}
else if (prev_depth) {
- iter.forward_char();
+ if(!iter.ends_line()) {
+ iter.forward_to_line_end();
+ }
// See if the line was left contentless and remove the bullet
// if so.
- if (iter.ends_line() || insert_iter.get_line_offset() < 3 ) {
+ if(iter.get_line_offset() < 3) {
Gtk::TextIter start = get_iter_at_line(iter.get_line());
Gtk::TextIter end_iter = start;
end_iter.forward_to_line_end();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]