<p>Hello! Your finction "Mark All - Shift + Ctrl + M" have some mistaken behaviour:</p>
<pre><code>// code example
/* Initialize index array. */
for (int i = 0; i < IndexSize; i++)
        for (int j = 0; j < IndexSize; j++)
                for (int k = 0; k < OriSize; k++)
                        index[i][j][k] = 0.0;

</code></pre>
<p>when I select "i" in 'for (int i' (yes, I want to see where 'i' used in the loop), and press Shift + Ctrl + M not only 'i' will be highlighted. This functionality will highlight ALL 'i' occurences in document including occurences inside words. I mean words Initialize, int, Size, index will be highlighting too, but I've selected only 'i', just a variable name consisting of one letter, so I expect highlight only single 'i', not 'i' inside words. Just try and you will understand what I mean, I guess. Look at pictures in attach.</p>
<p>Incorrect highlight:<br>
<a href="https://cloud.githubusercontent.com/assets/6382438/25066064/65eb2bfe-2224-11e7-85ac-d70375664c9a.PNG" target="_blank"><img src="https://cloud.githubusercontent.com/assets/6382438/25066064/65eb2bfe-2224-11e7-85ac-d70375664c9a.PNG" alt="incorrect_highlight" style="max-width:100%;"></a></p>
<p>Correct highlight:<br>
<a href="https://cloud.githubusercontent.com/assets/6382438/25066063/65e8fdac-2224-11e7-8428-8b499c113b94.PNG" target="_blank"><img src="https://cloud.githubusercontent.com/assets/6382438/25066063/65e8fdac-2224-11e7-8428-8b499c113b94.PNG" alt="correct_highlight" style="max-width:100%;"></a></p>
<p>So, I've found how to fix this issue:<br>
geany-master\src\keybindings.c : line 1570</p>
<p>just replace this</p>
<pre><code>if (sci_has_selection(sci))
        search_mark_all(doc, text, GEANY_FIND_MATCHCASE);
else
        search_mark_all(doc, text, GEANY_FIND_MATCHCASE | GEANY_FIND_WHOLEWORD);

</code></pre>
<p>to this</p>
<pre><code>/*
if (sci_has_selection(sci))
        search_mark_all(doc, text, GEANY_FIND_MATCHCASE);
else
*/
search_mark_all(doc, text, GEANY_FIND_MATCHCASE | GEANY_FIND_WHOLEWORD);

</code></pre>
<p>key flag GEANY_FIND_WHOLEWORD will highlight only selected occurences and do not highlight it inside words. I've compiled this variant, it is work!</p>
<p>Request: please, add optional button "Mark All - Shift + Ctrl + M" to Toolbar, and make it is can be added to Toolbar by "Preferences -> Interface -> Toolbar -> Customise Toolbar". As for me it is very usefull feature, many other texteditors have no such feature, Geany has - and it is cool!</p>
<p>P.S. Sorrrrry for my english. And if you will need more details - you can write to <a href="mailto:i_am_mole@mail.ru">i_am_mole@mail.ru</a>, I will clarify, honestly.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/1467">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ2XJuRDmMH_ptV_J1_6DNiRiWMnIks5rwRAjgaJpZM4M-bVl">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ_g64ODDqzKcKv3_97ps6s7NBPz-ks5rwRAjgaJpZM4M-bVl.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/1467"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Mark All - mistake (#1467)"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1467"}}}</script>