Skip to content

Commit 0ac738a

Browse files
authored
Bracket Colors, initial code review
* various small updates recommended from Geany community
1 parent b75167c commit 0ac738a

File tree

6 files changed

+7
-134
lines changed

6 files changed

+7
-134
lines changed

Diff for: README

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Available plugins are:
4949
* ``addons`` -- the Addons plugin
5050
* ``autoclose`` -- the Autoclose plugin
5151
* ``automark`` -- the Automark plugin
52+
* ``bracketcolors`` -- the BracketColors plugin
5253
* ``codenav`` -- the CodeNav plugin
5354
* ``commander`` -- the Commander plugin
5455
* ``debugger`` -- the Debugger plugin

Diff for: bracketcolors/README

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Color brackets, parenthesis, and braces
2-
===================
2+
=======================================
33

44
.. contents::
55

66
About
77
-----
88

99
This plugin enables bracket coloring features. Brackets are colored based on
10-
nesting level
10+
nesting level, often referred as "rainbow brackets".
1111

1212
Features
1313
--------

Diff for: bracketcolors/src/BracketMap.cc

+1-34
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* BracketMap.cc
33
*
4-
* Copyright 2013 Asif Amin <[email protected]>
4+
* Copyright 2023 Asif Amin <[email protected]>
55
*
66
* This program is free software; you can redistribute it and/or modify
77
* it under the terms of the GNU General Public License as published by
@@ -67,7 +67,6 @@
6767
}
6868

6969

70-
7170
// -----------------------------------------------------------------------------
7271
void BracketMap::ComputeOrder()
7372
/*
@@ -109,35 +108,3 @@
109108
GetOrder(bracket) = orderStack.size() - 1;
110109
}
111110
}
112-
113-
114-
115-
// -----------------------------------------------------------------------------
116-
void BracketMap::Show()
117-
/*
118-
119-
----------------------------------------------------------------------------- */
120-
{ g_debug("%s: Showing bracket map ...", __FUNCTION__);
121-
122-
for (const auto it : mBracketMap) {
123-
124-
const Index &startIndex = it.first;
125-
const Bracket &bracket = it.second;
126-
127-
Length length = std::get<0>(bracket);
128-
Order order = std::get<1>(bracket);
129-
130-
Index end = -1;
131-
if (length > 0) {
132-
end = startIndex + length;
133-
}
134-
135-
g_debug(
136-
"%s: Bracket at %d, Length: %d, End: %d, Order: %d",
137-
__FUNCTION__, startIndex, length, end, order
138-
);
139-
}
140-
141-
g_debug("%s: ... Finished showing bracket map", __FUNCTION__);
142-
}
143-

Diff for: bracketcolors/src/BracketMap.h

+1-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* BracketMap.h
33
*
4-
* Copyright 2013 Asif Amin <[email protected]>
4+
* Copyright 2023 Asif Amin <[email protected]>
55
*
66
* This program is free software; you can redistribute it and/or modify
77
* it under the terms of the GNU General Public License as published by
@@ -40,8 +40,6 @@
4040
BracketMap();
4141
~BracketMap();
4242

43-
void Show();
44-
4543
void Update(Index index, Length length);
4644
void ComputeOrder();
4745

@@ -62,15 +60,4 @@
6260
}
6361
};
6462

65-
66-
67-
68-
69-
70-
71-
72-
73-
74-
75-
7663
#endif

0 commit comments

Comments
 (0)