Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
colinkiama committed Nov 24, 2023
1 parent d204e92 commit f60f177
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ namespace Scratch {
}

if (options.contains ("go-to")) {
var go_to_string_variant = options.lookup_value ("go-to", GLib.VariantType.STRING);
var go_to_string_variant = options.lookup_value ("go-to", GLib.VariantType.STRING);
string selection_range_string = (string) go_to_string_variant.get_string ();
location_jump_manager.parse_selection_range_string (selection_range_string);
debug ("go-to arg value: %s", selection_range_string);
Expand Down
12 changes: 5 additions & 7 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ namespace Scratch {
string focused_document = settings.get_string ("focused-document");
string uri;
int pos;
bool was_restore_overriden = false;
bool was_restore_overriden = false;
while (doc_info_iter.next ("(si)", out uri, out pos)) {
if (uri != "") {
GLib.File file;
Expand Down Expand Up @@ -702,12 +702,10 @@ namespace Scratch {
document_view.open_document (doc, focus, cursor_position);
}

public void open_document_at_selected_range (
Scratch.Services.Document doc,
bool focus = true,
SelectionRange range = SelectionRange.EMPTY,
bool is_override = false)
{
public void open_document_at_selected_range (Scratch.Services.Document doc,
bool focus = true,
SelectionRange range = SelectionRange.EMPTY,
bool is_override = false) {
if (restore_override != null && is_override == false) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Services/RestoreOverride.vala
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ public class RestoreOverride : GLib.Object {
range: range
);
}
}
}
2 changes: 1 addition & 1 deletion src/Structs/SelectionRange.vala
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ public struct SelectionRange {
public int end_column;

public const SelectionRange EMPTY = {0, 0, 0, 0};
}
}
2 changes: 1 addition & 1 deletion src/Widgets/SourceView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ namespace Scratch.Widgets {
Gtk.TextIter start_iter;
buffer.get_start_iter (out start_iter);
start_iter.set_line (range.start_line - 1);

if (range.start_column > 0) {
start_iter.set_visible_line_offset (range.start_column - 1);
}
Expand Down

0 comments on commit f60f177

Please sign in to comment.