| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
So it has more chances to be seen. If the code is moved to another
file, for example, the git blame won't work.
|
|
|
|
|
|
|
|
|
|
|
| |
If a completion proposal returns markup of "<b>foo</b> <b>foo</b>", the
first bold will not be respected in most cases. The font-desc we get
from the style usually has PANGO_FONT_MASK_WEIGHT set, even when it is
set to normal. Thus, the PangoLayout has two PangoAttr in the
PangoAttrList which set weight at the same offset.
This can be removed if https://bugzilla.gnome.org/show_bug.cgi?id=755968
gets fixed.
|
|
|
|
|
|
|
|
| |
It is common to have a mixture of GtkSourceCompletionProposal where some
have pixbuf/gicon/icon-name and some do not. This was causing the rows
without provided icons to inherit that of the previously rendered row.
This simply unsets the image if we did not find one to set.
|
| |
|
|
|
|
| |
Include gtksourceview-i18n.h instead.
|
|
|
|
|
| |
Properties are no longer translated in GtkSourceView. That's a waste of
time.
|
| |
|
| |
|
|
|
|
| |
gtk_style_context_get returns a copy
|
| |
|
|
|
|
| |
The regex is already complicated, but if there are errors in it, …
|
|
|
|
|
| |
I happened to run into this while manually typing in font-sizing in CSS
using the Gtk inspector. Quick, easy fix.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Under certain HiDPI situations, 1x icons were loaded and rendered with
the scale factor applied. As expected, this resulted in blurry icons.
Of note, were blurry icons in the GtkSourceGutterRendererPixbuf.
This is not the most efficient, but is not terribly different from what
is happening today. We create a new cairo_surface_t for the pixbuf
manually, with the scale applied. gdk_cairo_set_source_pixbuf() also
does this, but without the scale.
We could optimize this in the future by making our pixbuf helper return
cairo_surface_t* rather than GdkPixbuf*.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Base basic_backward_regex_search() on basic_forward_regex_search(). The
code is simpler, but less efficient.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Write unit tests.
- Adapt basic_forward_regex_search() to support partial matches.
The gedit code calls gtk_source_search_context_get_occurrence_position()
to know if the selected text matches. get_occerrence_position()
traverses the occurrences by first going to tag toggles, and then inside
the tagged text, find the exact matches with basic_forward_search().
Finding the exact matches is needed because when contiguous matches are
found, when applying the tag the previous match boundary is lost.
https://bugzilla.gnome.org/show_bug.cgi?id=752719
|
|
|
|
|
| |
We know that on the left of the cursor there are only leading spaces.
No need to be paranoïd and checks everywhere.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ctrl+backspace deletes all the leading spaces, if only leading
spaces are on the left of the cursor. This was tight to the
smart-backspace property, but the smart-backspace is more about removing
one indentation level when spaces are used for the indentation.
So it's better to always handle the ctrl+backspace behavior, outside of
the smart-backspace property.
The behavior of ctrl+backspace in GtkTextView is to remove the previous
word. But the previous word can be on a previous line, so it's not a
great default behavior.
|
|
|
|
|
| |
Fix bug https://bugzilla.gnome.org/show_bug.cgi?id=740910
and add a unit test
|
|
|
|
|
|
|
| |
- use delete_interactive() and insert_interactive().
- access some properties directly instead of calling the getter.
- be sure to avoid a division by zero (with the modulo)
- other small things
|
|
|
|
| |
" |text" -> do a smart-backspace here didn't work.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The trailing iter was not set correctly, it was set one character too
far on the left. The _previous_ character needs to be checked, since the
character pointed to by an iter is the character on the right of the
iter location.
There was other problems in the implementation, like re-using the
"start" variable for... the end of the line. Or hiding the iteration
operation of the loops at the end of the long conditions. The code was
not really clear, and as a proof of that, there was a bug.
|
| |
|
|
|
|
|
|
| |
Remove the old cut&pasted strdup_strftime and use g_date_time_format
instead. Add to the documentation more details about the supported
format specifiers.
|
| |
|
|
|
|
| |
The code is clearer than using TRUE.
|
| |
|
| |
|
|
|
|
|
|
| |
Support setting an icon-name or a GIcon on providers and proposals
as an alternative to setting the Pixbuf. This makes much easier
to use symbolic icons.
|
|
|
|
|
| |
And do not translate the property descriptions,
see commit e9bc0e5d4f5c242a23f7d55d395fb2c70fa83bc9.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=753435
|
| |
|
| |
|
|
|
|
| |
'start' is also a function parameter.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
'encodings' is a global variable containing all the encodings.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|