going back in history sort of works, but is quite buggy
This commit is contained in:
parent
0da9e95b2a
commit
67a5096267
@ -317,7 +317,7 @@ fn main() {
|
|||||||
load_page = true;
|
load_page = true;
|
||||||
}
|
}
|
||||||
else if user_input == "b" {
|
else if user_input == "b" {
|
||||||
if historical_position > 1 {
|
if historical_position >= 1 {
|
||||||
historical_position -= 1;
|
historical_position -= 1;
|
||||||
if let Ok(parsed_value) = parse_url(format!("{}://{}/{}",history[historical_position].protocol.clone(), history[historical_position].hostname.clone(),history[historical_position].path.clone()),&url.hostname) {
|
if let Ok(parsed_value) = parse_url(format!("{}://{}/{}",history[historical_position].protocol.clone(), history[historical_position].hostname.clone(),history[historical_position].path.clone()),&url.hostname) {
|
||||||
url = parsed_value;
|
url = parsed_value;
|
||||||
@ -349,6 +349,9 @@ fn main() {
|
|||||||
port: url.port.clone(),
|
port: url.port.clone(),
|
||||||
path: url.path.clone(),
|
path: url.path.clone(),
|
||||||
});
|
});
|
||||||
|
for i in historical_position+1..history.len()-1 {
|
||||||
|
history.remove(i);
|
||||||
|
}
|
||||||
historical_position += 1;
|
historical_position += 1;
|
||||||
load_page = true;
|
load_page = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user