On Mon, Sep 10, 2018 at 11:05 AM, Huw Davies huw@codeweavers.com wrote:
This inner loop to process %% is ugly. Just do the processing of %s in this block. If you want to make sure you only do it once then set a flag.
Alright, I honestly think it's ok since it's a short block, but I'll count the number of args then, I think it's a better approach than a flag (even though in this case it's the same thing since only one %s arg is allowed).
Again, let's put spaces around binary operators (here the minus op) in new code. This applies other patches in this series too.
However it would be nicer to have format_quick_complete return the length so that you can call EM_SETSEL with the correct length rather than an over-estimate.
Will do.
Note that I might miss some spaces between operators especially in future patches (I have quite some patches lined up for AutoComplete locally right now) but I hope that's not such a big deal even if I miss the odd one, I'll try to put spaces where I find them though.