mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-25 09:05:10 +00:00
Making the progress an integer, as per the specification (#739)
This commit is contained in:
parent
4c66fdf09d
commit
4ff22e6603
@ -223,7 +223,7 @@ struct WorkDoneProgress {
|
||||
const char *kind;
|
||||
std::optional<std::string> title;
|
||||
std::optional<std::string> message;
|
||||
std::optional<double> percentage;
|
||||
std::optional<int> percentage;
|
||||
};
|
||||
struct WorkDoneProgressParam {
|
||||
const char *token;
|
||||
|
@ -729,7 +729,7 @@ void mainLoop() {
|
||||
(Twine(completed - last_idle) + "/" + Twine(enqueued - last_idle))
|
||||
.str();
|
||||
param.value.percentage =
|
||||
100.0 * (completed - last_idle) / (enqueued - last_idle);
|
||||
100 * (completed - last_idle) / (enqueued - last_idle);
|
||||
notify("$/progress", param);
|
||||
} else if (in_progress) {
|
||||
stats.last_idle.store(enqueued, std::memory_order_relaxed);
|
||||
|
Loading…
Reference in New Issue
Block a user