Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
girara
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwmt
girara
Commits
a2a6a8e8
Commit
a2a6a8e8
authored
Dec 10, 2018
by
Sebastian Ramacher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Be consistent
parent
cac857cb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
+13
-13
girara/callbacks.c
girara/callbacks.c
+1
-1
girara/completion.c
girara/completion.c
+2
-2
girara/config.c
girara/config.c
+7
-7
girara/shortcuts.c
girara/shortcuts.c
+3
-3
No files found.
girara/callbacks.c
View file @
a2a6a8e8
...
...
@@ -162,7 +162,7 @@ girara_callback_view_key_press_event(GtkWidget* widget,
/* buffer could match a command */
if
(
!
strncmp
(
session_private
->
buffer
.
command
->
str
,
shortcut
->
buffered_command
,
session_private
->
buffer
.
command
->
len
))
{
/* command matches buffer exactly */
if
(
!
strcmp
(
session_private
->
buffer
.
command
->
str
,
shortcut
->
buffered_command
)
if
(
!
g_strcmp0
(
session_private
->
buffer
.
command
->
str
,
shortcut
->
buffered_command
)
&&
(
session
->
modes
.
current_mode
==
shortcut
->
mode
||
shortcut
->
mode
==
0
))
{
g_string_free
(
session_private
->
buffer
.
command
,
TRUE
);
g_string_free
(
session
->
global
.
buffer
,
TRUE
);
...
...
girara/completion.c
View file @
a2a6a8e8
...
...
@@ -199,8 +199,8 @@ girara_isc_completion(girara_session_t* session, girara_argument_t* argument, gi
* there is only one completion entry
*/
if
(
(
argument
->
n
==
GIRARA_HIDE
)
||
(
current_parameter
&&
previous_parameter
&&
strcmp
(
current_parameter
,
previous_parameter
))
||
(
current_command
&&
previous_command
&&
strcmp
(
current_command
,
previous_command
))
||
(
current_parameter
&&
previous_parameter
&&
g_strcmp0
(
current_parameter
,
previous_parameter
))
||
(
current_command
&&
previous_command
&&
g_strcmp0
(
current_command
,
previous_command
))
||
(
input_length
!=
previous_length
)
||
is_single_entry
)
...
...
girara/config.c
View file @
a2a6a8e8
...
...
@@ -126,11 +126,11 @@ cb_scrollbars(girara_session_t* session, const char* name,
bool
show_hscrollbar
=
strchr
(
guioptions
,
'h'
)
!=
NULL
;
bool
show_vscrollbar
=
strchr
(
guioptions
,
'v'
)
!=
NULL
;
if
(
strcmp
(
name
,
"show-scrollbars"
)
==
0
)
{
if
(
g_strcmp0
(
name
,
"show-scrollbars"
)
==
0
)
{
show_hscrollbar
=
show_vscrollbar
=
val
;
}
else
if
(
strcmp
(
name
,
"show-h-scrollbar"
)
==
0
)
{
}
else
if
(
g_strcmp0
(
name
,
"show-h-scrollbar"
)
==
0
)
{
show_hscrollbar
=
val
;
}
else
if
(
strcmp
(
name
,
"show-v-scrollbar"
)
==
0
)
{
}
else
if
(
g_strcmp0
(
name
,
"show-v-scrollbar"
)
==
0
)
{
show_vscrollbar
=
val
;
}
...
...
@@ -289,7 +289,7 @@ girara_config_handle_add(girara_session_t* session, const char* identifier, gira
/* search for existing config handle */
GIRARA_LIST_FOREACH_BODY
(
session_private
->
config
.
handles
,
girara_config_handle_t
*
,
data
,
if
(
strcmp
(
data
->
identifier
,
identifier
)
==
0
)
{
if
(
g_strcmp0
(
data
->
identifier
,
identifier
)
==
0
)
{
data
->
handle
=
handle
;
found
=
true
;
break
;
...
...
@@ -364,7 +364,7 @@ config_parse(girara_session_t* session, const char* path)
}
/* include gets a special treatment */
if
(
strcmp
(
argv
[
0
],
"include"
)
==
0
)
{
if
(
g_strcmp0
(
argv
[
0
],
"include"
)
==
0
)
{
if
(
argc
!=
2
)
{
girara_warning
(
"Could not process line %d in '%s': usage: include path."
,
line_number
,
path
);
}
else
{
...
...
@@ -379,7 +379,7 @@ config_parse(girara_session_t* session, const char* path)
g_free
(
basename
);
}
if
(
strcmp
(
newpath
,
path
)
==
0
)
{
if
(
g_strcmp0
(
newpath
,
path
)
==
0
)
{
girara_warning
(
"Could not process line %d in '%s': trying to include itself."
,
line_number
,
path
);
}
else
{
girara_debug
(
"Loading config file '%s'."
,
newpath
);
...
...
@@ -395,7 +395,7 @@ config_parse(girara_session_t* session, const char* path)
girara_config_handle_t
*
handle
=
NULL
;
GIRARA_LIST_FOREACH_BODY
(
session_private
->
config
.
handles
,
girara_config_handle_t
*
,
tmp
,
handle
=
tmp
;
if
(
strcmp
(
handle
->
identifier
,
argv
[
0
])
==
0
)
{
if
(
g_strcmp0
(
handle
->
identifier
,
argv
[
0
])
==
0
)
{
handle
->
handle
(
session
,
argument_list
);
break
;
}
else
{
...
...
girara/shortcuts.c
View file @
a2a6a8e8
...
...
@@ -28,7 +28,7 @@ girara_shortcut_add(girara_session_t* session, guint modifier, guint key, const
bool
found_existing_shortcut
=
false
;
GIRARA_LIST_FOREACH_BODY_WITH_ITER
(
session
->
bindings
.
shortcuts
,
girara_shortcut_t
*
,
iter
,
shortcuts_it
,
if
(((
shortcuts_it
->
mask
==
modifier
&&
shortcuts_it
->
key
==
key
&&
(
modifier
!=
0
||
key
!=
0
))
||
(
buffer
&&
shortcuts_it
->
buffered_command
&&
!
strcmp
(
shortcuts_it
->
buffered_command
,
buffer
)))
(
buffer
&&
shortcuts_it
->
buffered_command
&&
!
g_strcmp0
(
shortcuts_it
->
buffered_command
,
buffer
)))
&&
((
shortcuts_it
->
mode
==
mode
)
||
(
mode
==
0
)))
{
if
(
shortcuts_it
->
argument
.
data
!=
NULL
)
{
...
...
@@ -74,7 +74,7 @@ girara_shortcut_remove(girara_session_t* session, guint modifier, guint key, con
/* search for existing binding */
GIRARA_LIST_FOREACH_BODY
(
session
->
bindings
.
shortcuts
,
girara_shortcut_t
*
,
shortcuts_it
,
if
(((
shortcuts_it
->
mask
==
modifier
&&
shortcuts_it
->
key
==
key
&&
(
modifier
!=
0
||
key
!=
0
))
||
(
buffer
&&
shortcuts_it
->
buffered_command
&&
!
strcmp
(
shortcuts_it
->
buffered_command
,
buffer
)))
(
buffer
&&
shortcuts_it
->
buffered_command
&&
!
g_strcmp0
(
shortcuts_it
->
buffered_command
,
buffer
)))
&&
shortcuts_it
->
mode
==
mode
)
{
girara_list_remove
(
session
->
bindings
.
shortcuts
,
shortcuts_it
);
handled
=
true
;
...
...
@@ -594,7 +594,7 @@ girara_shortcut_mapping_add(girara_session_t* session, const char* identifier, g
bool
found
=
false
;
GIRARA_LIST_FOREACH_BODY
(
session_private
->
config
.
shortcut_mappings
,
girara_shortcut_mapping_t
*
,
data
,
if
(
strcmp
(
data
->
identifier
,
identifier
)
==
0
)
{
if
(
g_strcmp0
(
data
->
identifier
,
identifier
)
==
0
)
{
data
->
function
=
function
;
found
=
true
;
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment